#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fn_add()
{
    sm9_fn_t    augend, addend, sum;
    std::uint8_t sum_data[32];

    static std::uint8_t augend0[32] = {0x21,0xf9,0xd1,0x32,0xb8,0xa6,0xa5,0xb5,0x7f,0xa3,0x4e,0x45,0x1a,0x88,0xb6,0xc9,0x74,0x52,0x0e,0xb5,0x98,0x65,0xad,0xcf,0xfc,0x5a,0x15,0xb2,0x65,0x1c,0x9f,0x9e};
    static std::uint8_t addend0[32] = {0x52,0xc5,0xcf,0xbe,0x10,0x93,0x56,0x7b,0xf3,0xbb,0xa7,0xcf,0x0c,0xa2,0xbf,0x25,0x26,0xd2,0x68,0x7d,0xb3,0x2c,0x4d,0x4f,0x0a,0x9c,0x93,0xb4,0x14,0x1a,0xd9,0x2c};
    static std::uint8_t sum0[32]    = {0x74,0xbf,0xa0,0xf0,0xc9,0x39,0xfc,0x31,0x73,0x5e,0xf6,0x14,0x27,0x2b,0x75,0xee,0x9b,0x24,0x77,0x33,0x4b,0x91,0xfb,0x1f,0x06,0xf6,0xa9,0x66,0x79,0x37,0x78,0xca};
    sm9_fn_from_bytes(augend, augend0);
    sm9_fn_from_bytes(addend, addend0);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum0, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend1[32] = {0x67,0xd1,0x6c,0xae,0x59,0x86,0xa6,0xb9,0xe0,0x19,0x1d,0xce,0x7d,0x90,0x0f,0x4e,0x00,0x51,0x05,0x11,0xba,0xf0,0x9a,0x45,0x06,0x73,0xc2,0x00,0x5b,0xa2,0x64,0x3f};
    static std::uint8_t addend1[32] = {0xa4,0xda,0xbf,0xac,0xd5,0x44,0xb8,0xec,0xfd,0xb3,0x23,0x20,0x08,0xf8,0x7a,0x47,0x2a,0x65,0xbf,0x14,0x5e,0xff,0x56,0xff,0x0e,0x96,0xe6,0xfa,0xf0,0xaa,0xc2,0xbb};
    static std::uint8_t sum1[32]    = {0x56,0x6c,0x2c,0x5b,0x2c,0x27,0xb8,0xb5,0x07,0xc8,0x95,0x9e,0x90,0xf9,0xc2,0x50,0xe0,0xc4,0x30,0xdb,0x01,0x05,0x65,0x55,0x2f,0x9b,0xc7,0x5e,0x75,0xae,0x57,0xd5};
    sm9_fn_from_bytes(augend, augend1);
    sm9_fn_from_bytes(addend, addend1);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum1, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend2[32] = {0xae,0x33,0x57,0x82,0x46,0x4f,0xbe,0x7a,0xac,0xbb,0xc2,0x77,0xe5,0x4a,0x29,0x70,0xe4,0xd0,0x18,0xdf,0x5b,0xd1,0xc7,0xd8,0x79,0x65,0xf2,0x76,0x44,0x4c,0xe7,0x5f};
    static std::uint8_t addend2[32] = {0xa9,0x04,0x79,0x15,0xcf,0x42,0xdb,0x51,0x3b,0x23,0xee,0xbc,0xba,0x3f,0x95,0xdb,0xdb,0xad,0xa6,0xa5,0xcb,0xd0,0x5c,0x37,0x95,0xab,0xd1,0xaa,0x38,0x2a,0xda,0x43};
    static std::uint8_t sum2[32]    = {0xa0,0xf7,0xd0,0x98,0x12,0xee,0xf2,0xda,0x11,0xdc,0x05,0xe4,0xa9,0xfa,0xf8,0x08,0x76,0x8b,0x2c,0x3a,0x0e,0xb7,0x98,0x21,0x29,0xa2,0xe2,0x83,0xa5,0xd8,0xf2,0x7d};
    sm9_fn_from_bytes(augend, augend2);
    sm9_fn_from_bytes(addend, addend2);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum2, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend3[32] = {0x3d,0xd7,0xc7,0xb9,0x91,0xf3,0x11,0x6a,0x5c,0x34,0xd5,0xca,0x7f,0x87,0xd2,0x5a,0x71,0x1d,0x3e,0x26,0x71,0x82,0x8a,0xe9,0x12,0xf0,0xfb,0xaa,0xa4,0x6f,0x43,0x56};
    static std::uint8_t addend3[32] = {0x9f,0x61,0x5c,0xe4,0x68,0xb1,0xa7,0xcc,0x42,0x4e,0x02,0xd2,0x74,0xfa,0xe8,0xdb,0x0f,0xab,0xb4,0x0c,0x91,0x44,0x3b,0xb6,0xd1,0x5d,0x4a,0x41,0x26,0xea,0xed,0xaf};
    static std::uint8_t sum3[32]    = {0x26,0xf9,0x24,0x9d,0xf8,0x01,0x12,0x44,0xc8,0x7f,0x2d,0x4c,0xfe,0xf3,0xf3,0xf1,0x36,0xd6,0x5e,0xe7,0xe9,0xdc,0x3a,0xb0,0xfe,0xdf,0x64,0x4e,0xf4,0xbb,0x61,0xe0};
    sm9_fn_from_bytes(augend, augend3);
    sm9_fn_from_bytes(addend, addend3);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum3, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend4[32] = {0x30,0x26,0x8c,0xf7,0x1d,0xd9,0x92,0xdf,0x03,0xc8,0x23,0xa9,0x54,0xa6,0x3c,0xe0,0x79,0x81,0xc5,0x05,0xbe,0x65,0x9e,0x19,0xae,0x77,0xfb,0x79,0x25,0xb2,0xff,0xc8};
    static std::uint8_t addend4[32] = {0x23,0xbd,0xd3,0xf5,0x5d,0x4d,0x0f,0x77,0x56,0x19,0x73,0x8c,0xc7,0x45,0xd5,0x09,0x72,0xdd,0x08,0x53,0x3d,0x33,0x28,0x5c,0x6b,0x60,0x1b,0x6f,0xd7,0x9a,0x92,0x60};
    static std::uint8_t sum4[32]    = {0x53,0xe4,0x60,0xec,0x7b,0x26,0xa2,0x56,0x59,0xe1,0x97,0x36,0x1b,0xec,0x11,0xe9,0xec,0x5e,0xcd,0x58,0xfb,0x98,0xc6,0x76,0x19,0xd8,0x16,0xe8,0xfd,0x4d,0x92,0x28};
    sm9_fn_from_bytes(augend, augend4);
    sm9_fn_from_bytes(addend, addend4);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum4, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend5[32] = {0x45,0x2a,0xfd,0xb5,0x31,0xd4,0x2e,0x3e,0xcc,0xd1,0x0a,0x97,0x0e,0xd1,0xe3,0x21,0xc3,0xc4,0x38,0x18,0x5c,0x86,0xeb,0xb1,0x52,0x44,0x85,0xa6,0xe3,0x35,0x72,0x3f};
    static std::uint8_t addend5[32] = {0x7f,0x7c,0x1f,0xd9,0xd7,0x78,0x30,0x25,0x43,0xaf,0xc6,0x2b,0xf9,0xb4,0xd4,0xfd,0xe9,0x45,0x58,0x91,0x78,0xb8,0xc0,0x67,0x55,0x35,0x3b,0x39,0xf5,0xf8,0x48,0x02};
    static std::uint8_t sum5[32]    = {0x0e,0x67,0x1d,0x8f,0x06,0xa8,0xb7,0x72,0x3a,0x7d,0x25,0x73,0x12,0xf7,0xf0,0xdb,0x63,0x16,0xfd,0x5e,0xbc,0x55,0x20,0x29,0xc2,0x0a,0xdf,0x44,0x02,0x8e,0xeb,0x1c};
    sm9_fn_from_bytes(augend, augend5);
    sm9_fn_from_bytes(addend, addend5);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum5, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend6[32] = {0x31,0x9e,0x9d,0xe8,0xcc,0xf4,0xf6,0xb3,0x6d,0xbb,0x8d,0x6b,0xb3,0x97,0x10,0x52,0x26,0x2c,0x73,0xb5,0xa1,0x7c,0x05,0x95,0x11,0x9c,0xcf,0xb3,0x83,0x4a,0x82,0xfb};
    static std::uint8_t addend6[32] = {0x24,0xbd,0xb8,0x38,0x69,0x1a,0x48,0xd3,0x34,0xc2,0x8f,0xc7,0x73,0x4a,0x11,0x06,0x2b,0x99,0x60,0xe3,0xc9,0x49,0x2b,0xec,0xdc,0x42,0x8a,0x5c,0x99,0x89,0xbe,0xf6};
    static std::uint8_t sum6[32]    = {0x56,0x5c,0x56,0x21,0x36,0x0f,0x3f,0x86,0xa2,0x7e,0x1d,0x33,0x26,0xe1,0x21,0x58,0x51,0xc5,0xd4,0x99,0x6a,0xc5,0x31,0x81,0xed,0xdf,0x5a,0x10,0x1c,0xd4,0x41,0xf1};
    sm9_fn_from_bytes(augend, augend6);
    sm9_fn_from_bytes(addend, addend6);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum6, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend7[32] = {0x98,0x2c,0xc7,0x6d,0xfe,0xf7,0xb9,0xce,0x09,0x67,0xd1,0x2c,0xbb,0x20,0x8b,0x48,0x6c,0x3d,0xaf,0x52,0xf0,0xa5,0xb1,0xb4,0x4d,0x5d,0x1d,0xdd,0x2b,0x41,0x8a,0xd0};
    static std::uint8_t addend7[32] = {0x5b,0x05,0x26,0xf3,0xb9,0xd0,0x15,0x01,0x81,0x73,0x66,0x5f,0x36,0x88,0xfb,0x41,0x21,0xb6,0xcf,0x40,0x4d,0x21,0x58,0xf0,0xa6,0xb2,0x8c,0x91,0xfc,0xbf,0xe3,0x1b};
    static std::uint8_t sum7[32]    = {0x3c,0xf1,0xee,0x61,0xb6,0x24,0x27,0xdd,0xb4,0xd7,0x8c,0x3b,0xfc,0x1a,0xbf,0x45,0x44,0x01,0xeb,0x48,0x24,0xdc,0x7e,0xb6,0x0e,0xa0,0xc8,0xd2,0x51,0x62,0x9e,0xc6};
    sm9_fn_from_bytes(augend, augend7);
    sm9_fn_from_bytes(addend, addend7);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum7, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend8[32] = {0x56,0x42,0x0e,0xf5,0x37,0xb4,0xf8,0x65,0x58,0x5e,0x94,0x28,0x19,0x28,0x18,0xbb,0x6d,0x55,0xf6,0x1d,0x47,0x44,0x35,0x90,0x6b,0xb0,0xaf,0xc6,0x27,0x73,0x32,0x00};
    static std::uint8_t addend8[32] = {0x85,0x2d,0x44,0x8a,0x58,0x74,0x0c,0x9c,0x76,0xb8,0x4d,0x07,0x46,0xb6,0x22,0x19,0xcd,0x0a,0x89,0x28,0xfa,0xa2,0xae,0x89,0x8c,0x02,0x55,0x2a,0xed,0xf6,0x76,0x40};
    static std::uint8_t sum8[32]    = {0x25,0x2f,0x53,0x7f,0x8d,0x85,0x5e,0x0f,0xf9,0x13,0x35,0xdf,0x6a,0x4f,0x73,0x90,0xf0,0x6d,0xeb,0xfb,0x28,0xfc,0x58,0x2b,0x12,0x44,0x23,0x54,0x3e,0xca,0xd9,0x1b};
    sm9_fn_from_bytes(augend, augend8);
    sm9_fn_from_bytes(addend, addend8);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum8, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend9[32] = {0x2d,0xf1,0x07,0x95,0xea,0x41,0x62,0xf1,0x74,0x9a,0x7c,0x52,0x31,0x4a,0xc3,0x52,0x80,0xb6,0x9d,0x90,0xc8,0x91,0x55,0x6f,0x6e,0xa6,0x26,0x9f,0x75,0x0c,0xa2,0x1a};
    static std::uint8_t addend9[32] = {0x16,0x72,0xd1,0x48,0x52,0xb1,0x36,0xb4,0xf5,0xf9,0x75,0xa2,0x44,0xd7,0xed,0xf1,0x32,0xd4,0xfa,0x35,0xb4,0xe3,0xb8,0x2a,0x81,0xad,0x02,0x06,0xa3,0x5f,0x1f,0xea};
    static std::uint8_t sum9[32]    = {0x44,0x63,0xd8,0xde,0x3c,0xf2,0x99,0xa6,0x6a,0x93,0xf1,0xf4,0x76,0x22,0xb1,0x43,0xb3,0x8b,0x97,0xc6,0x7d,0x75,0x0d,0x99,0xf0,0x53,0x28,0xa6,0x18,0x6b,0xc2,0x04};
    sm9_fn_from_bytes(augend, augend9);
    sm9_fn_from_bytes(addend, addend9);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum9, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend10[32] = {0x1c,0x47,0x4b,0x93,0x45,0x51,0xa9,0x06,0x4f,0x7f,0x8a,0xc8,0x75,0xde,0xbf,0x75,0x37,0xed,0xb4,0x42,0xeb,0x1b,0x79,0x91,0x49,0x5f,0xc7,0xce,0x6e,0x48,0x64,0x89};
    static std::uint8_t addend10[32] = {0x62,0x6d,0xf8,0xff,0xdd,0x91,0x13,0xb6,0x30,0x4f,0x4f,0xc9,0x75,0xe1,0x24,0x11,0x25,0xe3,0x31,0x4f,0x8a,0xce,0xb6,0xb9,0xca,0xcc,0x05,0xfa,0x62,0xae,0xbb,0xc6};
    static std::uint8_t sum10[32]    = {0x7e,0xb5,0x44,0x93,0x22,0xe2,0xbc,0xbc,0x7f,0xce,0xda,0x91,0xeb,0xbf,0xe3,0x86,0x5d,0xd0,0xe5,0x92,0x75,0xea,0x30,0x4b,0x14,0x2b,0xcd,0xc8,0xd0,0xf7,0x20,0x4f};
    sm9_fn_from_bytes(augend, augend10);
    sm9_fn_from_bytes(addend, addend10);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum10, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend11[32] = {0x79,0x64,0x4c,0x05,0x46,0xdd,0x54,0xd4,0x5b,0x3f,0x32,0x60,0x2a,0x6d,0x20,0xad,0x02,0xb4,0x60,0x72,0x78,0x1b,0xaa,0xef,0xac,0x72,0x2d,0xb4,0x59,0xc2,0xb2,0x7c};
    static std::uint8_t addend11[32] = {0x88,0xa8,0xaf,0x28,0x5e,0x32,0x75,0x7f,0xad,0x9b,0x09,0xa9,0x8b,0x09,0xf8,0xbe,0x39,0x5a,0xc1,0xfc,0x5a,0xa2,0xae,0x6d,0x16,0xb1,0xcc,0x59,0x1b,0x29,0xed,0x05};
    static std::uint8_t sum11[32]    = {0x4b,0xcc,0xfb,0x2d,0xa2,0x6c,0x23,0x62,0x32,0xd6,0x90,0xb9,0xbf,0xe8,0x52,0x26,0xf2,0x1c,0x8f,0x23,0xb9,0xd3,0xcd,0x6d,0xdd,0xb5,0x18,0x70,0x9e,0x4d,0xd0,0x5c};
    sm9_fn_from_bytes(augend, augend11);
    sm9_fn_from_bytes(addend, addend11);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum11, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend12[32] = {0xad,0x91,0x01,0x26,0x64,0x6e,0xe9,0xcc,0x18,0x65,0x50,0xc1,0xb8,0x3c,0x2b,0xd0,0x98,0x1a,0x7f,0xa2,0x6f,0xeb,0x81,0xc8,0xf3,0xb5,0xaa,0xbf,0xeb,0xcb,0xde,0xf6};
    static std::uint8_t addend12[32] = {0xac,0xe8,0xe5,0xee,0xe6,0xe7,0xff,0x0c,0xd9,0xa0,0x41,0x80,0x81,0x5e,0x65,0xed,0x46,0xbc,0xf1,0x6f,0x4c,0x27,0xde,0x49,0x54,0xe1,0x58,0x27,0x2d,0xbc,0xb9,0x4e};
    static std::uint8_t sum12[32]    = {0xa4,0x39,0xe7,0x15,0x48,0xb3,0x41,0xe7,0x1c,0x01,0xe6,0xf2,0x44,0x0b,0xca,0x79,0x94,0xe4,0xdd,0xc6,0xa3,0x28,0xd4,0x23,0x63,0x28,0x21,0x4a,0x42,0xe9,0xc9,0x1f};
    sm9_fn_from_bytes(augend, augend12);
    sm9_fn_from_bytes(addend, addend12);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum12, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend13[32] = {0x33,0xf1,0xcd,0xee,0x73,0xb6,0x01,0x4b,0xda,0xcb,0x8d,0x5e,0xac,0x0c,0x72,0x36,0x20,0x94,0x19,0x78,0x86,0xc3,0x49,0x80,0xc7,0xdd,0x28,0x32,0x18,0x40,0xad,0xa0};
    static std::uint8_t addend13[32] = {0x3c,0x2d,0x28,0x87,0xeb,0x55,0x3f,0x19,0xd9,0xc7,0x79,0x0a,0x99,0xeb,0xbf,0x9d,0x92,0xa0,0x60,0x81,0x61,0x01,0x91,0x49,0xb6,0x01,0xaf,0x37,0xce,0xe9,0x5c,0xd4};
    static std::uint8_t sum13[32]    = {0x70,0x1e,0xf6,0x76,0x5f,0x0b,0x40,0x65,0xb4,0x93,0x06,0x69,0x45,0xf8,0x31,0xd3,0xb3,0x34,0x79,0xf9,0xe7,0xc4,0xda,0xca,0x7d,0xde,0xd7,0x69,0xe7,0x2a,0x0a,0x74};
    sm9_fn_from_bytes(augend, augend13);
    sm9_fn_from_bytes(addend, addend13);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum13, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend14[32] = {0xaf,0xa6,0xd4,0x3a,0x17,0x38,0xfe,0x97,0xac,0x3e,0x4d,0x0b,0x13,0x2f,0xd2,0x17,0x2e,0xa4,0x59,0x1b,0xe5,0xe2,0x63,0x3a,0x3b,0xc7,0x94,0x1d,0xf8,0x14,0xc0,0x00};
    static std::uint8_t addend14[32] = {0x2b,0xef,0x20,0xaf,0x9a,0xab,0xd8,0xe7,0xa2,0x3e,0xcc,0xeb,0x56,0xa4,0x07,0x66,0x5f,0xfa,0xdd,0xf4,0x65,0x8d,0xa3,0x3f,0x28,0x35,0x93,0x48,0xe3,0x61,0x77,0x2c};
    static std::uint8_t sum14[32]    = {0x25,0x55,0xf4,0xe9,0xaf,0x41,0x30,0x8d,0x78,0x79,0x6e,0xa6,0x74,0x45,0x12,0x39,0x44,0xac,0xa3,0xc5,0x32,0x85,0x7a,0x8a,0x7e,0x8e,0x45,0xca,0x04,0xd7,0x68,0x07};
    sm9_fn_from_bytes(augend, augend14);
    sm9_fn_from_bytes(addend, addend14);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum14, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend15[32] = {0x21,0xc0,0xb2,0xf1,0x75,0x93,0xfb,0xec,0x63,0xd5,0x30,0x6e,0x68,0x3c,0x5a,0xc5,0x3d,0xfd,0xc0,0x34,0x8a,0x61,0xcc,0x17,0x64,0xed,0x9e,0x0b,0x80,0x10,0xad,0xe2};
    static std::uint8_t addend15[32] = {0x8b,0xeb,0x25,0x74,0x20,0xdb,0x90,0x20,0x1a,0xc3,0x05,0xe1,0xab,0x95,0xa6,0x8e,0x7d,0x64,0xcc,0x05,0xb9,0x5e,0xef,0x5a,0x1e,0x06,0xc0,0xd6,0x79,0x3b,0x86,0xeb};
    static std::uint8_t sum15[32]    = {0xad,0xab,0xd8,0x65,0x96,0x6f,0x8c,0x0c,0x7e,0x98,0x36,0x50,0x13,0xd2,0x01,0x53,0xbb,0x62,0x8c,0x3a,0x43,0xc0,0xbb,0x71,0x82,0xf4,0x5e,0xe1,0xf9,0x4c,0x34,0xcd};
    sm9_fn_from_bytes(augend, augend15);
    sm9_fn_from_bytes(addend, addend15);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum15, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend16[32] = {0x22,0x62,0xa7,0xbc,0xc0,0x06,0x54,0x97,0x53,0xfe,0xf6,0x8b,0xb8,0xd4,0x2d,0x6d,0x4d,0x8f,0x82,0x05,0xcb,0x0d,0xfb,0x60,0x43,0xe5,0x85,0xb8,0x97,0x6b,0x3d,0xe7};
    static std::uint8_t addend16[32] = {0x37,0xa6,0x59,0xcd,0x98,0x34,0x66,0xf0,0xcd,0x47,0x3d,0xa8,0x2b,0x79,0xf0,0xf2,0x03,0x2f,0x2e,0xe0,0x03,0x83,0xdb,0x3b,0xc0,0x13,0xfb,0x86,0x33,0x6e,0x1d,0xc0};
    static std::uint8_t sum16[32]    = {0x5a,0x09,0x01,0x8a,0x58,0x3a,0xbb,0x88,0x21,0x46,0x34,0x33,0xe4,0x4e,0x1e,0x5f,0x50,0xbe,0xb0,0xe5,0xce,0x91,0xd6,0x9c,0x03,0xf9,0x81,0x3e,0xca,0xd9,0x5b,0xa7};
    sm9_fn_from_bytes(augend, augend16);
    sm9_fn_from_bytes(addend, addend16);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum16, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend17[32] = {0x2e,0x2f,0xb4,0x44,0x4e,0x77,0x1c,0x8a,0x05,0x34,0x92,0x53,0xdd,0xd0,0xe1,0x9e,0x9a,0x74,0x64,0xd4,0x3f,0x5c,0x25,0xcb,0xe6,0x73,0x6f,0xb5,0x94,0x23,0x68,0x25};
    static std::uint8_t addend17[32] = {0xa6,0xdc,0xbe,0x6a,0xf8,0x91,0x06,0x30,0xc6,0xac,0x02,0x0c,0x47,0xee,0x1d,0x80,0xeb,0x80,0x64,0xfd,0x50,0x8c,0x86,0xc0,0x23,0x4c,0x5d,0x0c,0xd2,0xce,0xa3,0x98};
    static std::uint8_t sum17[32]    = {0x1e,0xcc,0x72,0xaf,0x44,0x64,0x7b,0xc8,0xf5,0xdc,0xe9,0x10,0x30,0x30,0x37,0xdb,0x3c,0x02,0x36,0x86,0x76,0xfe,0x20,0x9d,0x24,0x50,0xeb,0x25,0x90,0x53,0x3c,0x98};
    sm9_fn_from_bytes(augend, augend17);
    sm9_fn_from_bytes(addend, addend17);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum17, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend18[32] = {0x97,0x3c,0xc8,0x99,0xdd,0xa1,0xd8,0x0c,0x76,0xa7,0x17,0x1b,0xc1,0x3d,0x19,0xb1,0x68,0xc2,0xa5,0xa0,0xb7,0x24,0x63,0xc3,0x9c,0xb2,0x95,0x2e,0x80,0x3f,0xc4,0x06};
    static std::uint8_t addend18[32] = {0x34,0x66,0x09,0x94,0xb3,0xf1,0x5c,0x2c,0xa9,0x4b,0x6d,0xde,0xc3,0x52,0x29,0x56,0x25,0xca,0x82,0xc8,0x4c,0xa8,0x2e,0xa6,0x93,0xe5,0x97,0x73,0xf7,0x48,0xa7,0xd9};
    static std::uint8_t sum18[32]    = {0x15,0x62,0xd2,0x2e,0x8e,0xef,0x8d,0x47,0x49,0xee,0xd9,0xaa,0x8f,0x00,0x7b,0xc3,0x44,0x9a,0x95,0x1d,0xea,0xe2,0x06,0x7b,0x4b,0x29,0x4b,0x05,0xa0,0xe9,0x9c,0xba};
    sm9_fn_from_bytes(augend, augend18);
    sm9_fn_from_bytes(addend, addend18);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum18, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend19[32] = {0x14,0x37,0xc1,0x29,0xf5,0x1b,0x1b,0x36,0x6d,0x16,0xa2,0x6c,0x40,0x6a,0x45,0x82,0xee,0x0b,0x44,0x5a,0xb4,0xfe,0xf8,0x46,0x9b,0xe7,0xf1,0xc0,0x55,0x60,0x47,0x5f};
    static std::uint8_t addend19[32] = {0x26,0xf4,0xf5,0x1d,0x41,0x06,0x83,0x01,0x15,0xf9,0xad,0xc0,0x7f,0x44,0x43,0x63,0x24,0xab,0x4a,0xe4,0x92,0x54,0xaf,0x6c,0xc5,0x4d,0x97,0x6c,0x4f,0x82,0x67,0x91};
    static std::uint8_t sum19[32]    = {0x3b,0x2c,0xb6,0x47,0x36,0x21,0x9e,0x37,0x83,0x10,0x50,0x2c,0xbf,0xae,0x88,0xe6,0x12,0xb6,0x8f,0x3f,0x47,0x53,0xa7,0xb3,0x61,0x35,0x89,0x2c,0xa4,0xe2,0xae,0xf0};
    sm9_fn_from_bytes(augend, augend19);
    sm9_fn_from_bytes(addend, addend19);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum19, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend20[32] = {0x00,0x79,0x9e,0xe4,0x68,0xad,0x04,0xe8,0x40,0xd7,0xa8,0x44,0x2b,0xc9,0x83,0x79,0x61,0x48,0xb2,0x76,0xf1,0xde,0x10,0xfe,0x0c,0x6c,0x36,0x78,0x7d,0x34,0xd0,0xec};
    static std::uint8_t addend20[32] = {0x22,0x7f,0x3c,0x78,0x56,0xda,0xf1,0x70,0x72,0xad,0x0a,0x69,0x49,0xad,0x1e,0x43,0x8b,0x48,0xf4,0x91,0x3d,0x06,0xa2,0xcb,0x70,0x56,0xee,0xd6,0x09,0x26,0x47,0x32};
    static std::uint8_t sum20[32]    = {0x22,0xf8,0xdb,0x5c,0xbf,0x87,0xf6,0x58,0xb3,0x84,0xb2,0xad,0x75,0x76,0xa1,0xbc,0xec,0x91,0xa7,0x08,0x2e,0xe4,0xb3,0xc9,0x7c,0xc3,0x25,0x4e,0x86,0x5b,0x18,0x1e};
    sm9_fn_from_bytes(augend, augend20);
    sm9_fn_from_bytes(addend, addend20);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum20, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend21[32] = {0x3f,0x8d,0xba,0x48,0x46,0xd5,0x97,0x42,0x2a,0xc4,0xf3,0x84,0x19,0xb0,0x97,0x8c,0xd4,0x37,0xef,0x45,0xa0,0x9e,0x73,0x6b,0xae,0x8f,0x3a,0x2f,0x24,0x88,0x1c,0xc5};
    static std::uint8_t addend21[32] = {0x07,0xb8,0x24,0x9f,0xc7,0x5c,0x2f,0xa2,0x63,0xb1,0x12,0x93,0x15,0xf0,0xe1,0x81,0xb5,0x9a,0x90,0x46,0xb3,0x50,0xf3,0xc7,0x12,0xd3,0x6b,0x04,0x71,0x4a,0x9d,0xb9};
    static std::uint8_t sum21[32]    = {0x47,0x45,0xde,0xe8,0x0e,0x31,0xc6,0xe4,0x8e,0x76,0x06,0x17,0x2f,0xa1,0x79,0x0e,0x89,0xd2,0x7f,0x8c,0x53,0xef,0x67,0x32,0xc1,0x62,0xa5,0x33,0x95,0xd2,0xba,0x7e};
    sm9_fn_from_bytes(augend, augend21);
    sm9_fn_from_bytes(addend, addend21);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum21, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend22[32] = {0x63,0x68,0x2c,0x26,0x94,0x15,0xa9,0xfb,0x49,0x55,0x22,0xcb,0x59,0xb5,0x44,0x15,0xee,0xba,0x78,0x37,0xd4,0x17,0x81,0x0b,0xc6,0xbb,0x7a,0xe0,0x91,0x5e,0xc7,0xd8};
    static std::uint8_t addend22[32] = {0x9c,0x43,0xb9,0xbe,0xfa,0xe6,0xa4,0x24,0x75,0x84,0xa6,0x4b,0xf6,0x3b,0x27,0x00,0x87,0x8a,0xc8,0x4f,0x3b,0x60,0x75,0xde,0xca,0x9c,0xf1,0xf1,0x27,0xc8,0x35,0x18};
    static std::uint8_t sum22[32]    = {0x49,0x6b,0xe5,0xe5,0x8c,0x58,0xa7,0x2d,0xe8,0xd6,0x1d,0xc7,0x5a,0x61,0xa3,0xd2,0x2c,0x52,0xad,0x3b,0xf6,0x8d,0x6a,0xfb,0xab,0xe9,0x8b,0x34,0xe2,0x88,0x2d,0xcb};
    sm9_fn_from_bytes(augend, augend22);
    sm9_fn_from_bytes(addend, addend22);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum22, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend23[32] = {0x05,0xb9,0x41,0xa8,0x3b,0xfa,0x6b,0x52,0xe6,0xb6,0x75,0xb2,0xea,0x20,0x2e,0x66,0x2c,0xc4,0xf5,0xec,0x92,0x8c,0x75,0xaa,0xa4,0x2e,0x0d,0x55,0x73,0xdb,0xdc,0x1f};
    static std::uint8_t addend23[32] = {0x4f,0xdf,0x20,0xeb,0xc8,0xdb,0x71,0x07,0x46,0x4d,0xf9,0x9b,0x43,0x8e,0x75,0xd3,0x94,0x80,0xf9,0x18,0x04,0x24,0xa1,0x39,0x6a,0x5f,0x1d,0xdf,0xe1,0xaa,0x8f,0xfb};
    static std::uint8_t sum23[32]    = {0x55,0x98,0x62,0x94,0x04,0xd5,0xdc,0x5a,0x2d,0x04,0x6f,0x4e,0x2d,0xae,0xa4,0x39,0xc1,0x45,0xef,0x04,0x96,0xb1,0x16,0xe4,0x0e,0x8d,0x2b,0x35,0x55,0x86,0x6c,0x1a};
    sm9_fn_from_bytes(augend, augend23);
    sm9_fn_from_bytes(addend, addend23);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum23, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend24[32] = {0xa2,0x7c,0xf3,0x45,0x2f,0x3e,0xec,0xf0,0xff,0xd8,0xcb,0xeb,0xdf,0xed,0x03,0x5a,0x53,0x4a,0x10,0xf8,0xb2,0x64,0x58,0x10,0x92,0xad,0x87,0xfc,0xb9,0x22,0x3d,0x76};
    static std::uint8_t addend24[32] = {0x75,0x9d,0x27,0xe9,0xb8,0xf4,0xc0,0xd7,0x15,0xf3,0xc0,0xc5,0xf7,0x1f,0x3c,0xc9,0xcf,0x9c,0x90,0x4e,0x2f,0xa8,0x7a,0xa5,0xba,0x97,0x40,0x92,0x85,0x4c,0xbd,0xfd};
    static std::uint8_t sum24[32]    = {0x61,0xda,0x1b,0x2e,0xe5,0x90,0x06,0xd6,0x3f,0xc8,0xe1,0x61,0xe1,0x7d,0x78,0xdf,0xd8,0xf4,0x0d,0xfb,0xc9,0x22,0x46,0xc7,0x67,0xd5,0xe6,0xf2,0x67,0xd0,0x2c,0x4e};
    sm9_fn_from_bytes(augend, augend24);
    sm9_fn_from_bytes(addend, addend24);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum24, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend25[32] = {0x4e,0x10,0x20,0x56,0xf7,0x46,0xe2,0xd4,0xe3,0x51,0xf0,0x7e,0xd7,0xed,0x2d,0xc2,0xfa,0x4b,0x36,0x1b,0xdf,0xef,0x84,0xb8,0x64,0xb2,0x8e,0xe0,0xa2,0xb5,0x3b,0xcc};
    static std::uint8_t addend25[32] = {0x23,0xea,0xd0,0xfe,0x21,0x6e,0x5a,0x63,0x82,0x1e,0x1d,0xd6,0xf5,0xf4,0x19,0x34,0xab,0x79,0x57,0x2e,0xe4,0xc4,0x18,0x34,0xf4,0x09,0x09,0x03,0xdf,0xf4,0x61,0x47};
    static std::uint8_t sum25[32]    = {0x71,0xfa,0xf1,0x55,0x18,0xb5,0x3d,0x38,0x65,0x70,0x0e,0x55,0xcd,0xe1,0x46,0xf7,0xa5,0xc4,0x8d,0x4a,0xc4,0xb3,0x9c,0xed,0x58,0xbb,0x97,0xe4,0x82,0xa9,0x9d,0x13};
    sm9_fn_from_bytes(augend, augend25);
    sm9_fn_from_bytes(addend, addend25);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum25, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend26[32] = {0x19,0xf2,0x6b,0x48,0x20,0x82,0x6a,0x31,0x4e,0x71,0xb1,0x74,0x8b,0x31,0xd6,0xde,0xe2,0x90,0x8b,0x83,0x90,0x19,0xfa,0x73,0xf9,0x8f,0xf8,0xde,0xfb,0x71,0xa3,0x2f};
    static std::uint8_t addend26[32] = {0x3b,0x2c,0x2e,0x69,0xbf,0x8e,0xfd,0x62,0xa2,0x17,0x0d,0xb9,0x01,0x76,0xf5,0x75,0xb0,0x00,0xa7,0xd9,0x77,0x9a,0xc0,0x18,0x4b,0x77,0x43,0xec,0x05,0x42,0xc4,0x11};
    static std::uint8_t sum26[32]    = {0x55,0x1e,0x99,0xb1,0xe0,0x11,0x67,0x93,0xf0,0x88,0xbf,0x2d,0x8c,0xa8,0xcc,0x54,0x92,0x91,0x33,0x5d,0x07,0xb4,0xba,0x8c,0x45,0x07,0x3c,0xcb,0x00,0xb4,0x67,0x40};
    sm9_fn_from_bytes(augend, augend26);
    sm9_fn_from_bytes(addend, addend26);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum26, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend27[32] = {0x40,0x12,0xb3,0x04,0xb2,0x3d,0x71,0x28,0x03,0xbc,0xcf,0xf9,0xe0,0xf6,0xb0,0x73,0xf0,0x52,0x82,0xf3,0x19,0x1b,0xd2,0xc0,0x06,0x92,0x74,0xd6,0xb1,0x76,0x2f,0x58};
    static std::uint8_t addend27[32] = {0x0e,0x1e,0x7e,0x55,0xe0,0x75,0x2d,0xcf,0xa5,0xbf,0xc1,0x65,0x35,0x2e,0xe6,0xdc,0x9a,0x6f,0xaf,0x77,0x11,0x79,0x61,0x69,0xf2,0x7e,0xea,0xad,0xc4,0x63,0xed,0x4b};
    static std::uint8_t sum27[32]    = {0x4e,0x31,0x31,0x5a,0x92,0xb2,0x9e,0xf7,0xa9,0x7c,0x91,0x5f,0x16,0x25,0x97,0x50,0x8a,0xc2,0x32,0x6a,0x2a,0x95,0x34,0x29,0xf9,0x11,0x5f,0x84,0x75,0xda,0x1c,0xa3};
    sm9_fn_from_bytes(augend, augend27);
    sm9_fn_from_bytes(addend, addend27);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum27, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend28[32] = {0x32,0x82,0x52,0xb0,0x6f,0x72,0x0b,0x4b,0x2b,0x4a,0x0a,0x0b,0x2b,0x02,0x4d,0xf2,0xb2,0x07,0x00,0xfa,0xbd,0x55,0xd0,0x78,0x12,0xe7,0x71,0x39,0x4a,0x02,0xd0,0x9e};
    static std::uint8_t addend28[32] = {0x3d,0xfa,0x0a,0x82,0xfc,0xe5,0xaf,0x25,0x9c,0x45,0x8a,0x09,0x16,0x5b,0x41,0x1e,0xf6,0xfd,0x0e,0x09,0x60,0x33,0xb6,0xaf,0x10,0x70,0xb8,0xba,0x30,0xa9,0x6f,0x29};
    static std::uint8_t sum28[32]    = {0x70,0x7c,0x5d,0x33,0x6c,0x57,0xba,0x70,0xc7,0x8f,0x94,0x14,0x41,0x5d,0x8f,0x11,0xa9,0x04,0x0f,0x04,0x1d,0x89,0x87,0x27,0x23,0x58,0x29,0xf3,0x7a,0xac,0x3f,0xc7};
    sm9_fn_from_bytes(augend, augend28);
    sm9_fn_from_bytes(addend, addend28);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum28, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend29[32] = {0x08,0xa8,0xf0,0x6a,0xc9,0x32,0x2f,0xcc,0x0f,0xf9,0x16,0xe1,0x7a,0xf5,0xef,0x25,0x1f,0x66,0x9e,0x48,0xaf,0x1d,0xe3,0xbe,0x7b,0x54,0xfd,0x86,0xdb,0x8f,0xc9,0xef};
    static std::uint8_t addend29[32] = {0x2a,0xbd,0x70,0x5b,0x00,0xa4,0xf2,0x78,0xc8,0xd2,0x37,0xe3,0xa2,0x28,0xba,0x1a,0x6a,0xf4,0xe1,0xa6,0x30,0xf7,0x2f,0x89,0xa7,0xb3,0x53,0xde,0x9b,0x10,0x3b,0x10};
    static std::uint8_t sum29[32]    = {0x33,0x66,0x60,0xc5,0xc9,0xd7,0x22,0x44,0xd8,0xcb,0x4e,0xc5,0x1d,0x1e,0xa9,0x3f,0x8a,0x5b,0x7f,0xee,0xe0,0x15,0x13,0x48,0x23,0x08,0x51,0x65,0x76,0xa0,0x04,0xff};
    sm9_fn_from_bytes(augend, augend29);
    sm9_fn_from_bytes(addend, addend29);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum29, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend30[32] = {0x89,0xb9,0x7a,0x61,0x14,0xc5,0x3d,0x2f,0x01,0xe7,0x96,0x69,0x9f,0x1f,0xaa,0x96,0x8b,0xa9,0xa0,0x19,0x1c,0x34,0x05,0x95,0x26,0xbc,0x59,0x68,0x2d,0x83,0x7e,0x19};
    static std::uint8_t addend30[32] = {0x88,0x94,0x22,0x80,0x4c,0x82,0x74,0x43,0x76,0xb2,0x2c,0x25,0x86,0xcb,0xe6,0x90,0x30,0xca,0x48,0x3e,0x20,0x43,0x3a,0x8c,0xf8,0x86,0xa7,0x26,0xf5,0xa4,0xc4,0x41};
    static std::uint8_t sum30[32]    = {0x5c,0x0d,0x9c,0xe1,0x5e,0xa4,0x0a,0x80,0xa2,0x96,0x17,0x3f,0x30,0x5c,0xc9,0xe2,0x72,0x81,0x55,0x0c,0x23,0x8c,0xb4,0x33,0x39,0xd4,0x1e,0xf2,0x4c,0x89,0x73,0x35};
    sm9_fn_from_bytes(augend, augend30);
    sm9_fn_from_bytes(addend, addend30);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum30, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend31[32] = {0x1e,0x09,0xab,0xad,0x0d,0xf9,0x7c,0x65,0xd6,0xe2,0xb2,0xc0,0xd0,0x26,0xcf,0x79,0x54,0x0f,0x6f,0x74,0x8c,0x98,0x62,0x69,0xe1,0x5b,0x2b,0x4d,0x61,0xdb,0x0f,0xdb};
    static std::uint8_t addend31[32] = {0x90,0x0f,0xac,0x1c,0x84,0x75,0x91,0x74,0xa5,0xb2,0xbd,0xda,0xc5,0xb3,0x44,0xc7,0x7a,0x01,0xc6,0x12,0x1a,0xdf,0x9b,0x8d,0x58,0x3b,0x63,0x54,0x5c,0x63,0x7b,0x6e};
    static std::uint8_t sum31[32]    = {0xae,0x19,0x57,0xc9,0x92,0x6f,0x0d,0xda,0x7c,0x95,0x70,0x9b,0x95,0xda,0x14,0x40,0xce,0x11,0x35,0x86,0xa7,0x77,0xfd,0xf7,0x39,0x96,0x8e,0xa1,0xbe,0x3e,0x8b,0x49};
    sm9_fn_from_bytes(augend, augend31);
    sm9_fn_from_bytes(addend, addend31);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum31, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend32[32] = {0x59,0x0d,0x49,0xca,0x0c,0xa6,0xfc,0xc6,0x27,0x9b,0x04,0xd9,0xbd,0xe3,0x2c,0x5b,0x41,0xaf,0xa0,0x65,0x63,0xc3,0x74,0x56,0x33,0xb8,0xa8,0xfb,0x44,0x20,0xcb,0xbd};
    static std::uint8_t addend32[32] = {0xa0,0xc8,0x23,0xfe,0x87,0x7f,0x48,0x58,0x22,0x86,0xa2,0x87,0x6c,0xc8,0x78,0xfc,0xa6,0x85,0xcb,0x0f,0x3a,0x1f,0xa1,0x5c,0x96,0x52,0xa9,0x60,0x61,0xd6,0xc0,0x12};
    static std::uint8_t sum32[32]    = {0x43,0x95,0x6d,0xc8,0x91,0x82,0x9e,0x2c,0x74,0x1d,0xfc,0x11,0x35,0x1c,0xde,0x13,0x9e,0x42,0xd8,0x29,0x84,0xf8,0x89,0xc3,0xe4,0x9c,0x70,0xbe,0xcf,0x58,0xbc,0xaa};
    sm9_fn_from_bytes(augend, augend32);
    sm9_fn_from_bytes(addend, addend32);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum32, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend33[32] = {0x5d,0xa5,0x3c,0x61,0x22,0x40,0x68,0x8b,0x54,0xcf,0x41,0xf7,0x27,0x28,0x70,0xf0,0x04,0x32,0x9c,0xa6,0x82,0x65,0x0b,0xef,0x0f,0x75,0xb2,0x5a,0x20,0x20,0x35,0xd5};
    static std::uint8_t addend33[32] = {0x17,0xe6,0xa4,0x72,0x7c,0xa8,0xe7,0x9f,0x47,0x13,0xba,0xf0,0x96,0xd8,0x4c,0x12,0x8a,0x04,0x7f,0x3d,0x7d,0x61,0xb8,0x6f,0xd8,0x0f,0x14,0x7d,0xce,0xfd,0x5f,0x25};
    static std::uint8_t sum33[32]    = {0x75,0x8b,0xe0,0xd3,0x9e,0xe9,0x50,0x2a,0x9b,0xe2,0xfc,0xe7,0xbe,0x00,0xbd,0x02,0x8e,0x37,0x1b,0xe3,0xff,0xc6,0xc4,0x5e,0xe7,0x84,0xc6,0xd7,0xef,0x1d,0x94,0xfa};
    sm9_fn_from_bytes(augend, augend33);
    sm9_fn_from_bytes(addend, addend33);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum33, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend34[32] = {0x6c,0x31,0xc1,0x04,0xc8,0xab,0xd2,0x9a,0xf0,0xc6,0x65,0x4d,0xec,0x52,0x63,0x82,0x9c,0x99,0xd0,0x2b,0xe6,0x4a,0xbb,0x83,0x27,0x5f,0xdb,0x6f,0xa0,0x8e,0xff,0x26};
    static std::uint8_t addend34[32] = {0x2b,0xe4,0x61,0x12,0x5e,0x39,0x48,0x1b,0x9b,0x00,0x6f,0x3e,0xb2,0x2b,0xce,0xc0,0xa8,0xc6,0xe2,0x53,0x7c,0x0a,0xd2,0xaf,0x17,0x94,0xee,0xfe,0x47,0x84,0x92,0x53};
    static std::uint8_t sum34[32]    = {0x98,0x16,0x22,0x17,0x26,0xe5,0x1a,0xb6,0x8b,0xc6,0xd4,0x8c,0x9e,0x7e,0x32,0x43,0x45,0x60,0xb2,0x7f,0x62,0x55,0x8e,0x32,0x3e,0xf4,0xca,0x6d,0xe8,0x13,0x91,0x79};
    sm9_fn_from_bytes(augend, augend34);
    sm9_fn_from_bytes(addend, addend34);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum34, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend35[32] = {0x2f,0x91,0x5c,0x6e,0x60,0x0f,0x83,0x64,0x5e,0x27,0x5f,0x74,0xe9,0xf1,0x4a,0x6c,0x40,0xb3,0x6b,0x35,0x2d,0x7d,0x16,0x8f,0xd7,0xf0,0xfa,0x00,0xe1,0x5c,0x24,0x9f};
    static std::uint8_t addend35[32] = {0x1f,0x78,0x6c,0x1d,0xf4,0x65,0x52,0xfd,0x66,0x5a,0x70,0x7f,0x15,0x63,0xae,0x70,0x5b,0x06,0x8b,0x03,0x8d,0x75,0xa9,0xb1,0x14,0x11,0x73,0x6b,0xe6,0x0c,0x9f,0x5b};
    static std::uint8_t sum35[32]    = {0x4f,0x09,0xc8,0x8c,0x54,0x74,0xd6,0x61,0xc4,0x81,0xcf,0xf3,0xff,0x54,0xf8,0xdc,0x9b,0xb9,0xf6,0x38,0xba,0xf2,0xc0,0x40,0xec,0x02,0x6d,0x6c,0xc7,0x68,0xc3,0xfa};
    sm9_fn_from_bytes(augend, augend35);
    sm9_fn_from_bytes(addend, addend35);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum35, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend36[32] = {0x98,0x00,0xac,0x62,0x51,0x0d,0x27,0x80,0x77,0x56,0xd8,0xe7,0xea,0x97,0x94,0xe5,0x51,0x9c,0x6d,0x50,0xf8,0xfe,0x6b,0x1a,0x26,0x88,0x11,0x11,0x1e,0x50,0x6a,0xb1};
    static std::uint8_t addend36[32] = {0x40,0x6a,0xe4,0xe2,0x42,0xcd,0xcb,0x19,0xf4,0xb4,0xbc,0x2f,0xa6,0x45,0x1a,0x31,0x68,0x70,0x14,0xa5,0x4a,0x7c,0xb8,0x5b,0x78,0xf8,0x6c,0xb1,0xfc,0x92,0xf8,0x9f};
    static std::uint8_t sum36[32]    = {0x22,0x2b,0x91,0x44,0x91,0x37,0x4b,0xa8,0x96,0x07,0xe9,0xc7,0x9b,0x4d,0xe7,0xd2,0x70,0x19,0xee,0xab,0x2a,0x90,0x97,0x86,0xba,0x11,0x9c,0x26,0x44,0x44,0x94,0x2b};
    sm9_fn_from_bytes(augend, augend36);
    sm9_fn_from_bytes(addend, addend36);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum36, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend37[32] = {0x70,0xee,0xd8,0xb6,0xbb,0xfb,0xa2,0x43,0x87,0x7b,0x7c,0xc3,0xad,0xf3,0x7f,0xed,0x41,0x76,0x60,0xed,0x7c,0xe5,0x6e,0x28,0xc4,0x6e,0xd5,0xd1,0xb1,0x6a,0x10,0x3a};
    static std::uint8_t addend37[32] = {0x31,0x12,0x42,0x6f,0x01,0x03,0x50,0xe1,0xd4,0x64,0xdd,0xf6,0x6d,0xa1,0x87,0x14,0x55,0xf2,0x2f,0x33,0x2e,0xa0,0xd1,0x6e,0x0a,0x0b,0x1c,0x7d,0xea,0xf5,0x62,0x94};
    static std::uint8_t sum37[32]    = {0xa2,0x01,0x1b,0x25,0xbc,0xfe,0xf3,0x25,0x5b,0xe0,0x5a,0xba,0x1b,0x95,0x07,0x01,0x97,0x68,0x90,0x20,0xab,0x86,0x3f,0x96,0xce,0x79,0xf2,0x4f,0x9c,0x5f,0x72,0xce};
    sm9_fn_from_bytes(augend, augend37);
    sm9_fn_from_bytes(addend, addend37);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum37, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend38[32] = {0x46,0xfa,0x20,0xab,0x4c,0x55,0x1f,0x7e,0x56,0x24,0x54,0x33,0x53,0xce,0xc0,0x35,0x5e,0x85,0xdb,0x9c,0x22,0x4f,0xbb,0x63,0xf6,0xe0,0x88,0x8d,0xbc,0xe8,0x7a,0xc8};
    static std::uint8_t addend38[32] = {0x0f,0x90,0x1d,0x3f,0xc2,0x04,0x1a,0x50,0x0d,0x03,0x7e,0x49,0x54,0x70,0x64,0xae,0xf6,0xa1,0x1b,0x5c,0xe1,0x6d,0xcd,0xa5,0x9d,0x81,0x34,0xef,0xe7,0x76,0xff,0xec};
    static std::uint8_t sum38[32]    = {0x56,0x8a,0x3d,0xeb,0x0e,0x59,0x39,0xce,0x63,0x27,0xd2,0x7c,0xa8,0x3f,0x24,0xe4,0x55,0x26,0xf6,0xf9,0x03,0xbd,0x89,0x09,0x94,0x61,0xbd,0x7d,0xa4,0x5f,0x7a,0xb4};
    sm9_fn_from_bytes(augend, augend38);
    sm9_fn_from_bytes(addend, addend38);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum38, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend39[32] = {0x32,0x43,0xe6,0xf5,0x78,0x14,0xe1,0xf1,0x70,0x0c,0x01,0xd7,0xc0,0x5e,0x1c,0x58,0x8c,0x5d,0x6d,0x86,0x3d,0x24,0x22,0xbd,0x5a,0x25,0xb0,0xbc,0x9b,0x85,0x47,0x02};
    static std::uint8_t addend39[32] = {0x8d,0x52,0x9e,0xed,0xed,0x28,0xee,0xc0,0x83,0x87,0x8c,0xae,0x6d,0xdc,0xc1,0x3d,0xed,0xf3,0x64,0xf4,0xa1,0x5f,0x85,0x74,0xe8,0x51,0x78,0x27,0xe7,0x48,0x3f,0xea};
    static std::uint8_t sum39[32]    = {0x09,0x56,0x85,0xe3,0x62,0x9a,0x29,0xc0,0x1d,0x8f,0xe3,0x36,0x38,0xac,0x16,0x52,0x30,0x5e,0x3f,0x2f,0xc5,0x99,0x1c,0x43,0x5d,0x08,0x47,0x47,0xac,0x2e,0xb7,0xc7};
    sm9_fn_from_bytes(augend, augend39);
    sm9_fn_from_bytes(addend, addend39);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum39, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend40[32] = {0x15,0xa4,0xd9,0x97,0x9f,0x83,0xa8,0xd2,0x37,0x14,0xcc,0xa4,0xa5,0x1c,0xdc,0x33,0xfa,0x67,0x18,0x9c,0xf2,0x21,0xf2,0x94,0xf2,0x52,0x8b,0x66,0x22,0xbc,0xbe,0xe3};
    static std::uint8_t addend40[32] = {0x14,0x3e,0x08,0xf3,0x79,0xbf,0x96,0x8d,0x37,0xfb,0x19,0xe4,0xaf,0xad,0x6d,0x38,0x10,0x1e,0x88,0xa0,0xcd,0xf6,0x03,0x62,0x6b,0x18,0xb7,0xf6,0x88,0x55,0xc6,0x2f};
    static std::uint8_t sum40[32]    = {0x29,0xe2,0xe2,0x8b,0x19,0x43,0x3f,0x5f,0x6f,0x0f,0xe6,0x89,0x54,0xca,0x49,0x6c,0x0a,0x85,0xa1,0x3d,0xc0,0x17,0xf5,0xf7,0x5d,0x6b,0x43,0x5c,0xab,0x12,0x85,0x12};
    sm9_fn_from_bytes(augend, augend40);
    sm9_fn_from_bytes(addend, addend40);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum40, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend41[32] = {0x98,0xcd,0x83,0xa5,0x46,0x30,0xc4,0x7a,0xdc,0xc9,0x39,0x2a,0x41,0x07,0xd8,0x63,0xe0,0x14,0xdd,0xcf,0x8d,0xb1,0x77,0x72,0x92,0x32,0xd7,0xfc,0xf1,0xec,0x41,0x89};
    static std::uint8_t addend41[32] = {0x4d,0x6e,0xcc,0x3b,0x84,0x0c,0x35,0x9e,0xcd,0x36,0x01,0x0f,0xa4,0x3e,0xb2,0xf6,0x37,0x0e,0xb4,0xc7,0xd4,0x6a,0x7b,0x67,0xb5,0xf9,0x0d,0xcb,0xeb,0xa0,0x3f,0x06};
    static std::uint8_t sum41[32]    = {0x2f,0xfc,0x4f,0xe0,0xc7,0x99,0x53,0x27,0xd3,0xfb,0x8e,0xe9,0xef,0xb7,0xc4,0x15,0xcd,0x30,0xff,0x4c,0x49,0x31,0x66,0xeb,0x62,0xbd,0x04,0x2c,0x06,0xed,0xb1,0x6a};
    sm9_fn_from_bytes(augend, augend41);
    sm9_fn_from_bytes(addend, addend41);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum41, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend42[32] = {0x30,0x4f,0xc8,0xa2,0x14,0xad,0xb6,0xf7,0x4d,0x32,0x58,0x27,0x04,0xc4,0x65,0xf4,0xcf,0xda,0x50,0xae,0x13,0x8b,0xb9,0xe5,0x0e,0x11,0xa5,0xc5,0x42,0x9f,0xb9,0xe3};
    static std::uint8_t addend42[32] = {0x2a,0x64,0xe5,0xda,0xe5,0x28,0xca,0xc8,0xad,0x39,0x1c,0x23,0x61,0x94,0x45,0x6f,0x79,0xae,0xe5,0x28,0x8f,0x4c,0xbc,0x68,0x49,0x3a,0x42,0x1b,0xf4,0xbb,0xed,0x74};
    static std::uint8_t sum42[32]    = {0x5a,0xb4,0xae,0x7c,0xf9,0xd6,0x81,0xbf,0xfa,0x6b,0x74,0x4a,0x66,0x58,0xab,0x64,0x49,0x89,0x35,0xd6,0xa2,0xd8,0x76,0x4d,0x57,0x4b,0xe7,0xe1,0x37,0x5b,0xa7,0x57};
    sm9_fn_from_bytes(augend, augend42);
    sm9_fn_from_bytes(addend, addend42);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum42, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend43[32] = {0x19,0x0a,0x84,0x3d,0x54,0xbb,0xb6,0x40,0x88,0xb7,0x89,0x9a,0xe1,0xb5,0xdf,0x86,0x5c,0x7b,0x72,0x2f,0xa4,0x45,0x8c,0x97,0x22,0xaf,0xfc,0xd4,0x73,0x7b,0xc9,0xfd};
    static std::uint8_t addend43[32] = {0x19,0xe0,0xb6,0xc5,0xee,0x10,0x42,0x40,0x55,0x01,0xc3,0x06,0x58,0x1e,0x5c,0xde,0x60,0x2f,0xcc,0x5d,0x0d,0x8e,0x57,0x69,0x54,0x24,0x37,0xf0,0x67,0xc4,0xa6,0x12};
    static std::uint8_t sum43[32]    = {0x32,0xeb,0x3b,0x03,0x42,0xcb,0xf8,0x80,0xdd,0xb9,0x4c,0xa1,0x39,0xd4,0x3c,0x64,0xbc,0xab,0x3e,0x8c,0xb1,0xd3,0xe4,0x00,0x76,0xd4,0x34,0xc4,0xdb,0x40,0x70,0x0f};
    sm9_fn_from_bytes(augend, augend43);
    sm9_fn_from_bytes(addend, addend43);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum43, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend44[32] = {0x97,0xde,0x1f,0x98,0xca,0x80,0x27,0x61,0xc1,0x4b,0xe5,0xfb,0xbe,0x4d,0x00,0x4d,0xf7,0x64,0x12,0x37,0x43,0x82,0xf7,0x8c,0x38,0x7f,0xc1,0x49,0xb3,0xbd,0x9b,0x70};
    static std::uint8_t addend44[32] = {0x4e,0x3a,0xbe,0x08,0xb5,0x7e,0xbd,0x56,0x57,0xd6,0x99,0x95,0xee,0x62,0xea,0x68,0x0d,0xbe,0x0f,0xef,0x4f,0x65,0x96,0x43,0xa3,0x51,0x3b,0x22,0x2c,0xc3,0x21,0xe3};
    static std::uint8_t sum44[32]    = {0x2f,0xd8,0xdd,0xa1,0x7d,0x5b,0x3d,0xc6,0x43,0x1e,0xd4,0x41,0xb7,0x21,0x23,0x71,0xbb,0x2f,0x8e,0xdb,0x79,0xfe,0x01,0xe0,0xf6,0x62,0x1a,0xcf,0x09,0xe1,0xee,0x2e};
    sm9_fn_from_bytes(augend, augend44);
    sm9_fn_from_bytes(addend, addend44);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum44, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend45[32] = {0x14,0x15,0xba,0x77,0x75,0xa7,0x36,0xb3,0x40,0x74,0x7d,0x1d,0xdc,0xd0,0x24,0x9f,0xfd,0xfb,0x8d,0x66,0xea,0xeb,0x64,0x91,0xea,0xe7,0x0e,0x5d,0x42,0x55,0x19,0x44};
    static std::uint8_t addend45[32] = {0x20,0x52,0xe9,0x15,0x1e,0x67,0xa4,0x22,0x3a,0x7d,0x34,0xfc,0xbe,0xab,0x7c,0x21,0xa3,0x03,0xb4,0x7d,0x10,0x8e,0x83,0x43,0xa9,0xb7,0x63,0x00,0x09,0xd4,0x00,0x19};
    static std::uint8_t sum45[32]    = {0x34,0x68,0xa3,0x8c,0x94,0x0e,0xda,0xd5,0x7a,0xf1,0xb2,0x1a,0x9b,0x7b,0xa0,0xc1,0xa0,0xff,0x41,0xe3,0xfb,0x79,0xe7,0xd5,0x94,0x9e,0x71,0x5d,0x4c,0x29,0x19,0x5d};
    sm9_fn_from_bytes(augend, augend45);
    sm9_fn_from_bytes(addend, addend45);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum45, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend46[32] = {0x18,0xc9,0x6e,0x58,0x28,0x8f,0xd1,0x65,0xbf,0x75,0xd1,0x22,0xd2,0x3e,0x83,0x41,0x11,0x81,0x08,0x8a,0xb4,0x4c,0x84,0xac,0x65,0x75,0x70,0x0f,0x00,0x0b,0x14,0x26};
    static std::uint8_t addend46[32] = {0x2a,0x59,0xd5,0x60,0x64,0x47,0xd5,0xb1,0x57,0xdd,0x3e,0x8f,0x55,0x3a,0xa7,0xac,0x96,0xe4,0x75,0x42,0xec,0x84,0x1c,0x29,0xdd,0xfd,0xc9,0x89,0x19,0xc2,0x5f,0x09};
    static std::uint8_t sum46[32]    = {0x43,0x23,0x43,0xb8,0x8c,0xd7,0xa7,0x17,0x17,0x53,0x0f,0xb2,0x27,0x79,0x2a,0xed,0xa8,0x65,0x7d,0xcd,0xa0,0xd0,0xa0,0xd6,0x43,0x73,0x39,0x98,0x19,0xcd,0x73,0x2f};
    sm9_fn_from_bytes(augend, augend46);
    sm9_fn_from_bytes(addend, addend46);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum46, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend47[32] = {0x2b,0xa7,0x4b,0x4b,0x79,0x0e,0xfd,0x49,0xd5,0x89,0x7b,0xda,0x41,0x34,0x0a,0x8b,0xe9,0xe6,0xaa,0xf5,0x1a,0x68,0x29,0x4f,0xa0,0x62,0x7d,0x5d,0x31,0x3b,0x1d,0x45};
    static std::uint8_t addend47[32] = {0x39,0x6f,0xe6,0xe7,0x32,0x7e,0xb8,0xbf,0xc9,0x4b,0x4d,0xfe,0x17,0x36,0x69,0x9e,0x23,0xc3,0xbb,0x6d,0xcd,0x8f,0xca,0x64,0x90,0x0a,0xb0,0x7e,0x7d,0xb5,0x3b,0x0c};
    static std::uint8_t sum47[32]    = {0x65,0x17,0x32,0x32,0xab,0x8d,0xb6,0x09,0x9e,0xd4,0xc9,0xd8,0x58,0x6a,0x74,0x2a,0x0d,0xaa,0x66,0x62,0xe7,0xf7,0xf3,0xb4,0x30,0x6d,0x2d,0xdb,0xae,0xf0,0x58,0x51};
    sm9_fn_from_bytes(augend, augend47);
    sm9_fn_from_bytes(addend, addend47);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum47, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend48[32] = {0x23,0xc9,0xd7,0x98,0x73,0xf9,0x7a,0x02,0x8f,0xf8,0x6a,0x21,0x69,0x64,0x08,0x75,0x7f,0x54,0x1e,0x68,0x63,0xc6,0x6d,0x07,0x59,0x8a,0x11,0xf6,0xa5,0x5b,0xe8,0x2f};
    static std::uint8_t addend48[32] = {0x2f,0xfc,0x37,0xec,0x54,0xaf,0x5c,0x3a,0xcf,0x41,0xb0,0xbf,0x3b,0xec,0x58,0x73,0x23,0x2b,0x32,0x60,0xc7,0x1c,0xaa,0xb5,0xea,0x02,0xa5,0x10,0x1b,0xd5,0x3c,0xdd};
    static std::uint8_t sum48[32]    = {0x53,0xc6,0x0f,0x84,0xc8,0xa8,0xd6,0x3d,0x5f,0x3a,0x1a,0xe0,0xa5,0x50,0x60,0xe8,0xa2,0x7f,0x50,0xc9,0x2a,0xe3,0x17,0xbd,0x43,0x8c,0xb7,0x06,0xc1,0x31,0x25,0x0c};
    sm9_fn_from_bytes(augend, augend48);
    sm9_fn_from_bytes(addend, addend48);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum48, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend49[32] = {0x90,0xe3,0x77,0x3c,0x79,0x4b,0x03,0x84,0x93,0x99,0x26,0x7e,0x8e,0x62,0xa2,0xf9,0x80,0x20,0x39,0x64,0x93,0x52,0x58,0xf3,0xc7,0x0e,0x26,0xd1,0x43,0x4b,0x9b,0x0d};
    static std::uint8_t addend49[32] = {0xb1,0xa2,0xa3,0xd5,0xa9,0xdc,0xa7,0x61,0x52,0x6f,0x38,0x15,0x51,0x03,0xf2,0xad,0x07,0x21,0x41,0x91,0x41,0xd1,0x22,0x0b,0x69,0xdf,0x81,0x59,0x17,0x59,0x18,0x8b};
    static std::uint8_t sum49[32]    = {0x8c,0x46,0x1b,0x12,0x20,0x84,0x03,0xf4,0x10,0x04,0xb3,0x43,0xe9,0xd7,0xce,0x62,0x3d,0x4e,0xe7,0xaa,0xbc,0x38,0xef,0x10,0x4b,0x7e,0xc6,0x8d,0x84,0x05,0xe4,0x73};
    sm9_fn_from_bytes(augend, augend49);
    sm9_fn_from_bytes(addend, addend49);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum49, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend50[32] = {0x9d,0x73,0xf5,0x0d,0x89,0x50,0xbc,0x3a,0x1f,0xdd,0x39,0xbe,0x64,0x1f,0xd3,0xd3,0xa4,0x88,0xb3,0xd1,0x27,0xec,0x1a,0x13,0xfb,0x73,0x36,0x2e,0xcf,0xe8,0xe1,0xb6};
    static std::uint8_t addend50[32] = {0x45,0xb4,0x0b,0x56,0x47,0xce,0x76,0xd6,0x3a,0x4d,0xfe,0xba,0xc8,0x1a,0x6e,0x35,0x15,0x98,0x4f,0x3c,0x43,0x46,0x99,0xc7,0x8d,0xdc,0x47,0xe7,0x3e,0x12,0x92,0x30};
    static std::uint8_t sum50[32]    = {0x2c,0xe8,0x00,0x63,0xce,0x7b,0x8c,0x1e,0x84,0x27,0x8d,0x29,0x36,0xab,0x7a,0xc4,0x70,0x2e,0x6f,0xc2,0x52,0x48,0x27,0xec,0xa3,0xe0,0x9c,0x79,0x37,0x5c,0xa4,0xc1};
    sm9_fn_from_bytes(augend, augend50);
    sm9_fn_from_bytes(addend, addend50);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum50, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend51[32] = {0x5c,0xa9,0x1f,0xa0,0xc6,0x31,0xf7,0x19,0x33,0xc4,0xd8,0x59,0xfe,0x52,0x8e,0x63,0xf8,0xa5,0x39,0x5f,0x99,0x37,0xe4,0xe4,0x43,0xde,0x13,0x43,0x6d,0x8c,0xd1,0x7f};
    static std::uint8_t addend51[32] = {0x6b,0xcc,0xfb,0xf7,0xbc,0x0f,0xfe,0x2a,0xf6,0x04,0xe9,0x3c,0xa5,0x61,0x13,0x17,0x89,0x23,0x58,0x62,0x76,0xaa,0xda,0x30,0x36,0x04,0x4b,0xf2,0xce,0x95,0x1a,0xe8};
    static std::uint8_t sum51[32]    = {0x12,0x36,0x1b,0x98,0x7f,0x9e,0x4e,0x52,0x53,0xc6,0x16,0x46,0xae,0x24,0xda,0x37,0x37,0xd5,0xfe,0x76,0xf6,0xf8,0x33,0x25,0x94,0x73,0x7d,0x99,0x65,0x83,0x1d,0x42};
    sm9_fn_from_bytes(augend, augend51);
    sm9_fn_from_bytes(addend, addend51);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum51, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend52[32] = {0x35,0x6f,0xb0,0x48,0xfe,0xd7,0xb0,0x7b,0x76,0x67,0x1d,0xdd,0x4d,0x78,0xec,0xed,0x3f,0x82,0x79,0xf8,0x88,0x73,0x2d,0x2e,0x09,0x2e,0x2f,0x1a,0x21,0x7b,0x98,0xad};
    static std::uint8_t addend52[32] = {0xb5,0xf0,0xf3,0x23,0xfc,0xb2,0x3e,0x87,0x3b,0x49,0x92,0x84,0xf0,0x8a,0x47,0x51,0x3a,0x50,0xf5,0xa0,0xad,0xdd,0xdf,0xde,0xbc,0xf4,0xfa,0x61,0x2d,0xb5,0x4c,0x1f};
    static std::uint8_t sum52[32]    = {0x35,0x20,0xa3,0x6c,0xf8,0xe6,0x48,0x10,0xdb,0xad,0x05,0x12,0x48,0x74,0x6c,0xfa,0x2f,0xe0,0xdc,0x4e,0x1d,0x66,0x81,0x1d,0xe0,0xb4,0x47,0xde,0x78,0x92,0x15,0xa7};
    sm9_fn_from_bytes(augend, augend52);
    sm9_fn_from_bytes(addend, addend52);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum52, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend53[32] = {0x30,0x28,0x1f,0x44,0x8e,0x18,0x84,0xa7,0xc8,0xc6,0x14,0xdf,0x60,0x24,0x7d,0x2b,0xf1,0x26,0x01,0x22,0x48,0xe6,0xf9,0x95,0xba,0x88,0xfe,0x4a,0xcc,0x53,0xc6,0x08};
    static std::uint8_t addend53[32] = {0x25,0x9d,0xd8,0xf9,0x82,0x30,0x7e,0x1d,0x0f,0x64,0xe7,0xab,0x80,0x5a,0x70,0x28,0x5d,0x3c,0x2e,0x0b,0xb7,0x8d,0x50,0x5a,0xc7,0x5d,0x2a,0xb6,0xbc,0xb7,0xe5,0xad};
    static std::uint8_t sum53[32]    = {0x55,0xc5,0xf8,0x3e,0x10,0x49,0x02,0xc4,0xd8,0x2a,0xfc,0x8a,0xe0,0x7e,0xed,0x54,0x4e,0x62,0x2f,0x2e,0x00,0x74,0x49,0xf0,0x81,0xe6,0x29,0x01,0x89,0x0b,0xab,0xb5};
    sm9_fn_from_bytes(augend, augend53);
    sm9_fn_from_bytes(addend, addend53);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum53, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend54[32] = {0x36,0x84,0x60,0xd0,0xee,0xf7,0x1c,0xd9,0x1d,0xe8,0x2d,0xf5,0xf1,0xfd,0x3e,0x84,0x37,0x91,0x13,0x37,0x53,0x95,0x5a,0xa5,0xfd,0x8c,0x0d,0xb7,0x19,0x63,0xdf,0x7e};
    static std::uint8_t addend54[32] = {0x34,0xf1,0x9a,0xf0,0x23,0x8e,0xd8,0x40,0xdd,0x4e,0x79,0x55,0xdb,0x67,0x38,0xf6,0xee,0x02,0xf9,0x6c,0x5d,0xb3,0x90,0xc1,0xf0,0x28,0x3b,0x20,0x8e,0x55,0xa0,0x77};
    static std::uint8_t sum54[32]    = {0x6b,0x75,0xfb,0xc1,0x12,0x85,0xf5,0x19,0xfb,0x36,0xa7,0x4b,0xcd,0x64,0x77,0x7b,0x25,0x94,0x0c,0xa3,0xb1,0x48,0xeb,0x67,0xed,0xb4,0x48,0xd7,0xa7,0xb9,0x7f,0xf5};
    sm9_fn_from_bytes(augend, augend54);
    sm9_fn_from_bytes(addend, addend54);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum54, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend55[32] = {0x0e,0x82,0x16,0xe5,0xfb,0x6c,0x64,0xf2,0x70,0xc1,0x34,0x07,0x6f,0x25,0x8f,0x2c,0xf3,0x39,0x27,0x11,0xf1,0x01,0x5b,0xed,0xa3,0x12,0xc4,0x00,0x25,0x6c,0xa9,0xdc};
    static std::uint8_t addend55[32] = {0x0b,0x68,0xf2,0xf8,0xa6,0xd8,0xe7,0xd4,0x86,0x3d,0x6b,0x1e,0xa8,0x32,0xbe,0x3b,0xcc,0x34,0x6a,0x72,0xb9,0xc1,0x33,0x2e,0x66,0xf6,0x59,0xa1,0x0a,0xff,0x32,0x9e};
    static std::uint8_t sum55[32]    = {0x19,0xeb,0x09,0xde,0xa2,0x45,0x4c,0xc6,0xf6,0xfe,0x9f,0x26,0x17,0x58,0x4d,0x68,0xbf,0x6d,0x91,0x84,0xaa,0xc2,0x8f,0x1c,0x0a,0x09,0x1d,0xa1,0x30,0x6b,0xdc,0x7a};
    sm9_fn_from_bytes(augend, augend55);
    sm9_fn_from_bytes(addend, addend55);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum55, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend56[32] = {0x1d,0x80,0x5f,0x93,0x2b,0x0c,0xa0,0x37,0xaf,0xf3,0x04,0x3e,0xd8,0x55,0x2f,0x66,0xfe,0x99,0x78,0xff,0x78,0x04,0xe8,0x5e,0xe8,0x78,0x2b,0x3b,0xb9,0x8f,0x52,0x72};
    static std::uint8_t addend56[32] = {0x04,0x07,0xdf,0xff,0x33,0x8c,0xe5,0x35,0x32,0xdb,0x1a,0x59,0xd6,0x45,0xa4,0x18,0xca,0xf3,0xc8,0xcd,0x15,0x8f,0x48,0x9d,0xe0,0x30,0xd5,0x2f,0x99,0xe7,0x37,0x12};
    static std::uint8_t sum56[32]    = {0x21,0x88,0x3f,0x92,0x5e,0x99,0x85,0x6c,0xe2,0xce,0x1e,0x98,0xae,0x9a,0xd3,0x7f,0xc9,0x8d,0x41,0xcc,0x8d,0x94,0x30,0xfc,0xc8,0xa9,0x00,0x6b,0x53,0x76,0x89,0x84};
    sm9_fn_from_bytes(augend, augend56);
    sm9_fn_from_bytes(addend, addend56);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum56, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend57[32] = {0x39,0x38,0x92,0x44,0x64,0x3a,0x2f,0x5c,0x81,0x80,0x8a,0x23,0x64,0x6c,0xc8,0xd8,0x2d,0x95,0x8b,0x8f,0x51,0xc9,0x4d,0x49,0xec,0xc1,0x9c,0x50,0xd9,0x78,0xd3,0x6c};
    static std::uint8_t addend57[32] = {0x2b,0x52,0x51,0xc2,0xec,0x5a,0x2d,0x24,0x5a,0xc1,0xe3,0x03,0xaf,0xa8,0x33,0x24,0x85,0x78,0x4a,0x02,0x46,0x47,0x28,0xa4,0xe5,0x0b,0x96,0x4e,0x76,0xa8,0x50,0x29};
    static std::uint8_t sum57[32]    = {0x64,0x8a,0xe4,0x07,0x50,0x94,0x5c,0x80,0xdc,0x42,0x6d,0x27,0x14,0x14,0xfb,0xfc,0xb3,0x0d,0xd5,0x91,0x98,0x10,0x75,0xee,0xd1,0xcd,0x32,0x9f,0x50,0x21,0x23,0x95};
    sm9_fn_from_bytes(augend, augend57);
    sm9_fn_from_bytes(addend, addend57);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum57, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend58[32] = {0x36,0x4d,0xa7,0x33,0x28,0xc4,0x39,0xc3,0xf3,0x28,0xaa,0xc6,0xc3,0xae,0x1b,0x8f,0x45,0xc9,0xa0,0xb4,0xaa,0x35,0x0a,0x68,0xa0,0x29,0x76,0xab,0x68,0xe3,0xef,0x5d};
    static std::uint8_t addend58[32] = {0x8e,0xe3,0xde,0xb9,0xb1,0x2e,0x6b,0xc2,0xe7,0x2f,0x97,0x1d,0xb9,0xe8,0x5a,0xde,0x7a,0x97,0x57,0xc1,0xd5,0xb3,0x78,0x45,0xc4,0xef,0xb8,0x7d,0xc1,0x17,0xc0,0xdf};
    static std::uint8_t sum58[32]    = {0x0e,0xf1,0x85,0xec,0xd7,0x4e,0xfe,0x95,0x04,0x54,0x96,0x94,0x88,0x07,0xaf,0x29,0x76,0x6e,0x65,0x2b,0x66,0xfd,0xf6,0xbf,0x7f,0xaa,0x4d,0x8c,0x53,0x5c,0xe1,0x17};
    sm9_fn_from_bytes(augend, augend58);
    sm9_fn_from_bytes(addend, addend58);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum58, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend59[32] = {0x73,0xc6,0x71,0xc6,0xcd,0xe3,0x03,0xfc,0x7f,0xf9,0x35,0x88,0x9a,0x1c,0x9c,0x96,0x4a,0xbc,0x12,0xf8,0xf3,0x46,0x49,0xbf,0x6e,0x2b,0xd0,0xb6,0x6f,0xc1,0x10,0x09};
    static std::uint8_t addend59[32] = {0x8e,0x45,0x73,0xbf,0xc7,0x72,0x53,0xfd,0xce,0x03,0xba,0x72,0x84,0x7f,0x30,0x44,0x38,0x52,0x11,0x7e,0x5e,0x99,0x67,0x93,0xa3,0xb9,0x7d,0x4a,0xce,0xb9,0xef,0x4e};
    static std::uint8_t sum59[32]    = {0x4b,0xcb,0xe5,0x86,0x92,0xb1,0xb1,0x08,0x77,0xf9,0x44,0xab,0x29,0x0d,0x05,0x96,0x39,0x1b,0x91,0x2c,0x38,0xf5,0x25,0x64,0x2c,0x76,0x6c,0x64,0x67,0xdc,0x30,0x32};
    sm9_fn_from_bytes(augend, augend59);
    sm9_fn_from_bytes(addend, addend59);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum59, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend60[32] = {0xa5,0xb6,0x02,0xb0,0xcc,0xdb,0x76,0xe8,0x93,0xd9,0xad,0x52,0x53,0x3d,0x71,0xcc,0xdd,0x9d,0x31,0x8f,0xee,0x7f,0xc8,0x7a,0xdb,0x2f,0xd3,0x7e,0xd4,0x01,0xaa,0x6a};
    static std::uint8_t addend60[32] = {0x30,0x42,0x24,0xd7,0xc0,0x79,0x8f,0x93,0xbb,0xb7,0xfe,0xd4,0x8c,0xa1,0x77,0x1c,0x69,0xd8,0x57,0x39,0x05,0x5b,0x98,0x2b,0x13,0x19,0x4f,0x26,0x5a,0xf3,0x75,0xe8};
    static std::uint8_t sum60[32]    = {0x1f,0xb8,0x27,0x88,0x8a,0xb1,0x5f,0x8a,0x79,0x8e,0x00,0xd6,0xea,0x50,0x21,0xa4,0xfd,0x82,0xf5,0x7d,0xda,0xf0,0xd4,0xb7,0x08,0xda,0x41,0x08,0x58,0x56,0x51,0x2d};
    sm9_fn_from_bytes(augend, augend60);
    sm9_fn_from_bytes(addend, addend60);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum60, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend61[32] = {0x4e,0x2b,0x5f,0xcf,0x71,0x51,0x7d,0x68,0xae,0xf2,0xa7,0x80,0xa0,0x19,0x86,0x63,0x24,0x17,0xbe,0xdf,0x44,0xfa,0x2c,0xa1,0xb5,0x9f,0xde,0xe2,0xe4,0x78,0x3d,0xb0};
    static std::uint8_t addend61[32] = {0x32,0x39,0x83,0xcc,0xc9,0x72,0xd4,0x18,0xcf,0xe9,0x98,0x75,0x66,0x3c,0x30,0x9c,0x58,0x27,0x98,0xab,0x78,0x20,0xf3,0x1d,0xfe,0xf3,0x66,0x03,0x48,0xe8,0xdf,0xe5};
    static std::uint8_t sum61[32]    = {0x80,0x64,0xe3,0x9c,0x3a,0xc4,0x51,0x81,0x7e,0xdc,0x3f,0xf6,0x06,0x55,0xb6,0xff,0x7c,0x3f,0x57,0x8a,0xbd,0x1b,0x1f,0xbf,0xb4,0x93,0x44,0xe6,0x2d,0x61,0x1d,0x95};
    sm9_fn_from_bytes(augend, augend61);
    sm9_fn_from_bytes(addend, addend61);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum61, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend62[32] = {0x37,0x3a,0xad,0xf7,0x7a,0x24,0x80,0x64,0x61,0x5a,0x26,0xe8,0x6f,0xfa,0xa4,0xe2,0x18,0x98,0x92,0xa3,0xd9,0xfb,0x62,0x90,0x15,0x72,0x16,0x00,0x30,0x5e,0x6c,0x91};
    static std::uint8_t addend62[32] = {0x0f,0x48,0x47,0x65,0x63,0xec,0xf2,0xc8,0x11,0x50,0x58,0xfa,0xfb,0x61,0x36,0x97,0x52,0xdc,0xac,0x41,0x97,0xf8,0x81,0x27,0xfc,0x26,0x98,0x2e,0x2c,0x8b,0x3d,0x83};
    static std::uint8_t sum62[32]    = {0x46,0x82,0xf5,0x5c,0xde,0x11,0x73,0x2c,0x72,0xaa,0x7f,0xe3,0x6b,0x5b,0xdb,0x79,0x6b,0x75,0x3e,0xe5,0x71,0xf3,0xe3,0xb8,0x11,0x98,0xae,0x2e,0x5c,0xe9,0xaa,0x14};
    sm9_fn_from_bytes(augend, augend62);
    sm9_fn_from_bytes(addend, addend62);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum62, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend63[32] = {0x14,0x12,0x65,0x27,0x24,0xe8,0x60,0x5e,0xe3,0x22,0x7a,0x2f,0xc3,0x0a,0x37,0x26,0xfa,0x6a,0xc4,0x5d,0x0c,0x0b,0xcb,0x3a,0xce,0x6d,0x4a,0x0d,0x89,0x63,0x04,0x99};
    static std::uint8_t addend63[32] = {0x46,0xf7,0x88,0x0e,0x9d,0xb0,0x5b,0xf2,0xb1,0x79,0x74,0x60,0x07,0xb0,0xdf,0x0c,0x6d,0xbe,0x35,0xe9,0x71,0x88,0xf3,0xba,0x84,0xf6,0x67,0xb7,0xad,0xb2,0x3e,0x04};
    static std::uint8_t sum63[32]    = {0x5b,0x09,0xed,0x35,0xc2,0x98,0xbc,0x51,0x94,0x9b,0xee,0x8f,0xca,0xbb,0x16,0x33,0x68,0x28,0xfa,0x46,0x7d,0x94,0xbe,0xf5,0x53,0x63,0xb1,0xc5,0x37,0x15,0x42,0x9d};
    sm9_fn_from_bytes(augend, augend63);
    sm9_fn_from_bytes(addend, addend63);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum63, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend64[32] = {0x8a,0x8c,0xdd,0xe7,0xa8,0xac,0x7c,0xb4,0xa5,0x00,0x19,0xd8,0x06,0xda,0x08,0xe0,0x30,0xd2,0xf6,0x62,0x87,0x07,0x66,0x60,0xf0,0xe9,0x35,0xdb,0x7d,0x2d,0xee,0x6a};
    static std::uint8_t addend64[32] = {0x3e,0x7e,0x23,0xdd,0xb4,0xf7,0xc9,0xdc,0xb4,0x68,0xd1,0x97,0x7f,0x9b,0x58,0x7b,0x90,0x96,0xe5,0x26,0x74,0x47,0xbb,0xce,0x6a,0x25,0x14,0xc8,0x97,0x04,0xc3,0x4d};
    static std::uint8_t sum64[32]    = {0x12,0xcb,0x01,0xc5,0x5b,0x00,0x9f,0x9f,0x83,0x65,0x40,0x1f,0x90,0xe6,0x9a,0x17,0x77,0x77,0x48,0x3d,0xe2,0x64,0x96,0x40,0x75,0x9f,0x69,0x07,0x3d,0x93,0xe2,0x92};
    sm9_fn_from_bytes(augend, augend64);
    sm9_fn_from_bytes(addend, addend64);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum64, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend65[32] = {0x01,0xde,0x20,0x78,0x3c,0xb9,0x90,0xa4,0x0d,0xeb,0x64,0x22,0x6b,0x44,0xcd,0x07,0xfc,0x5f,0xaa,0xd2,0x77,0xe0,0x15,0xdc,0x9d,0xed,0x43,0x38,0x42,0xc4,0xe4,0xd0};
    static std::uint8_t addend65[32] = {0x8c,0xd3,0x53,0x23,0x60,0xea,0xbb,0x46,0xf3,0x57,0x84,0x15,0xff,0xd0,0xf2,0xc0,0x10,0x87,0x74,0xd7,0xb9,0x27,0xd5,0xc9,0xa6,0x3d,0xa8,0x3f,0x30,0xdd,0xa0,0x85};
    static std::uint8_t sum65[32]    = {0x8e,0xb1,0x73,0x9b,0x9d,0xa4,0x4b,0xeb,0x01,0x42,0xe8,0x38,0x6b,0x15,0xbf,0xc8,0x0c,0xe7,0x1f,0xaa,0x31,0x07,0xeb,0xa6,0x44,0x2a,0xeb,0x77,0x73,0xa2,0x85,0x55};
    sm9_fn_from_bytes(augend, augend65);
    sm9_fn_from_bytes(addend, addend65);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum65, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend66[32] = {0x18,0xc0,0x02,0x13,0x5c,0x47,0xd3,0x0c,0x00,0xf6,0xdb,0x33,0xe9,0x71,0x39,0x10,0xd5,0xc6,0x36,0x47,0xe7,0xfe,0x7e,0x55,0x67,0xa5,0x0c,0x3e,0x9b,0x55,0x95,0xb3};
    static std::uint8_t addend66[32] = {0x19,0x2b,0x37,0x67,0x2d,0x1f,0x23,0x93,0x3a,0x0f,0xda,0xed,0xc7,0x70,0x9b,0x2b,0x18,0x18,0x1f,0x49,0x7a,0xe3,0xc2,0x36,0xaa,0x6c,0x44,0xa7,0x18,0x7c,0x4b,0x37};
    static std::uint8_t sum66[32]    = {0x31,0xeb,0x39,0x7a,0x89,0x66,0xf6,0x9f,0x3b,0x06,0xb6,0x21,0xb0,0xe1,0xd4,0x3b,0xed,0xde,0x55,0x91,0x62,0xe2,0x40,0x8c,0x12,0x11,0x50,0xe5,0xb3,0xd1,0xe0,0xea};
    sm9_fn_from_bytes(augend, augend66);
    sm9_fn_from_bytes(addend, addend66);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum66, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend67[32] = {0x1d,0x46,0xd6,0x70,0x51,0x9d,0xec,0xe6,0xd9,0x0d,0xac,0x20,0x5a,0xfe,0x01,0x8d,0x11,0xca,0x12,0xdd,0x08,0x62,0x27,0x84,0x49,0xf4,0xa0,0x0e,0xbd,0xa6,0xfd,0xab};
    static std::uint8_t addend67[32] = {0x87,0xc8,0xde,0xe7,0x5e,0x82,0x17,0x6a,0x06,0x96,0x77,0x1c,0x24,0x7f,0xba,0xc4,0x1c,0xb9,0x89,0x3c,0x1d,0x68,0xcb,0xd1,0xb4,0x7a,0xae,0x5c,0x81,0x5f,0x36,0xb6};
    static std::uint8_t sum67[32]    = {0xa5,0x0f,0xb5,0x57,0xb0,0x20,0x04,0x50,0xdf,0xa4,0x23,0x3c,0x7f,0x7d,0xbc,0x51,0x2e,0x83,0x9c,0x19,0x25,0xca,0xf3,0x55,0xfe,0x6f,0x4e,0x6b,0x3f,0x06,0x34,0x61};
    sm9_fn_from_bytes(augend, augend67);
    sm9_fn_from_bytes(addend, addend67);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum67, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend68[32] = {0x34,0xe0,0x17,0xc6,0xb6,0xaa,0x76,0x7d,0x07,0x9b,0x25,0xda,0x8e,0x28,0x49,0x8b,0xcf,0x11,0x58,0x40,0x88,0x3f,0xa9,0xf1,0x40,0xf2,0x51,0x6e,0x95,0x0a,0x51,0xa6};
    static std::uint8_t addend68[32] = {0x1a,0x8f,0x1f,0x2b,0xf7,0x95,0xf1,0xd1,0x4d,0x92,0x1d,0xc1,0x3a,0x5f,0x6d,0xb2,0x51,0x5e,0x75,0x6f,0xcc,0x02,0x3e,0xe7,0x54,0x72,0x20,0x9d,0x15,0xeb,0x5a,0x62};
    static std::uint8_t sum68[32]    = {0x4f,0x6f,0x36,0xf2,0xae,0x40,0x68,0x4e,0x55,0x2d,0x43,0x9b,0xc8,0x87,0xb7,0x3e,0x20,0x6f,0xcd,0xb0,0x54,0x41,0xe8,0xd8,0x95,0x64,0x72,0x0b,0xaa,0xf5,0xac,0x08};
    sm9_fn_from_bytes(augend, augend68);
    sm9_fn_from_bytes(addend, addend68);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum68, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend69[32] = {0x0c,0xaf,0x86,0xfc,0xfc,0xa9,0x7c,0xa6,0xac,0x96,0x55,0x6c,0xbf,0x5b,0x6c,0x7a,0xc3,0x43,0x3f,0xb6,0x82,0x25,0x56,0xaa,0xde,0x94,0xf8,0x0e,0x09,0x9b,0xde,0x7d};
    static std::uint8_t addend69[32] = {0x5e,0x96,0x29,0x39,0x70,0x4b,0x43,0x09,0x6a,0x9c,0x8f,0x81,0xdf,0x59,0x07,0x02,0xab,0x40,0x64,0x5f,0x77,0x42,0x52,0x93,0xca,0xc6,0xa3,0x49,0x9e,0xd4,0x79,0x7a};
    static std::uint8_t sum69[32]    = {0x6b,0x45,0xb0,0x36,0x6c,0xf4,0xbf,0xb0,0x17,0x32,0xe4,0xee,0x9e,0xb4,0x73,0x7d,0x6e,0x83,0xa4,0x15,0xf9,0x67,0xa9,0x3e,0xa9,0x5b,0x9b,0x57,0xa8,0x70,0x57,0xf7};
    sm9_fn_from_bytes(augend, augend69);
    sm9_fn_from_bytes(addend, addend69);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum69, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend70[32] = {0x4d,0x96,0x3c,0x84,0x7e,0x9a,0x02,0x8f,0xb3,0xe5,0x5b,0x1f,0x49,0xa4,0xc6,0x63,0xdb,0x40,0x57,0xa3,0xae,0x92,0x5f,0xef,0x0d,0x65,0xe0,0xa3,0x15,0xff,0x10,0x45};
    static std::uint8_t addend70[32] = {0x47,0xb0,0xb1,0xc3,0xaf,0x03,0x33,0xa5,0x81,0x45,0x68,0x61,0x1e,0x44,0x00,0x30,0xe5,0x15,0xa7,0x3e,0x06,0x93,0xfc,0xdc,0xc1,0x46,0x9f,0x41,0x06,0xad,0xda,0x23};
    static std::uint8_t sum70[32]    = {0x95,0x46,0xee,0x48,0x2d,0x9d,0x36,0x35,0x35,0x2a,0xc3,0x80,0x67,0xe8,0xc6,0x94,0xc0,0x55,0xfe,0xe1,0xb5,0x26,0x5c,0xcb,0xce,0xac,0x7f,0xe4,0x1c,0xac,0xea,0x68};
    sm9_fn_from_bytes(augend, augend70);
    sm9_fn_from_bytes(addend, addend70);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum70, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend71[32] = {0x0e,0x7e,0xd5,0x8c,0x1f,0x1e,0x02,0x45,0x8e,0xec,0x83,0xd7,0x06,0x45,0x50,0x48,0x0d,0xa5,0xd1,0x9c,0x43,0x60,0x03,0x02,0x99,0x0d,0x49,0x5f,0x91,0xd9,0xbf,0xc6};
    static std::uint8_t addend71[32] = {0xa8,0x11,0x14,0x3b,0x7e,0xbd,0xc1,0xf4,0xfd,0xd9,0x19,0x7a,0x3e,0xe9,0x6d,0x4e,0x4a,0x1d,0xdf,0x2d,0x28,0xa7,0x27,0x2f,0xba,0xce,0x43,0xd5,0xf6,0x83,0x67,0xdd};
    static std::uint8_t sum71[32]    = {0x00,0x4f,0xe9,0xc7,0x9b,0x38,0x1d,0x48,0xb6,0xc1,0xf2,0x01,0x4f,0x9f,0xf6,0x52,0x0d,0xd1,0x1d,0x7e,0x53,0x1c,0x9e,0x43,0x6e,0x6c,0xab,0x98,0xb1,0xbe,0x58,0x7e};
    sm9_fn_from_bytes(augend, augend71);
    sm9_fn_from_bytes(addend, addend71);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum71, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend72[32] = {0x2c,0x6b,0x14,0x62,0x62,0x2d,0x5b,0x9c,0xa2,0xe6,0xfb,0x06,0x36,0x7b,0xa2,0x0f,0x52,0x4c,0x9f,0x32,0x77,0xaa,0xb9,0x26,0xdc,0xa1,0xb6,0x90,0xf5,0xad,0x9e,0x64};
    static std::uint8_t addend72[32] = {0x68,0xf1,0x98,0xd3,0x31,0xfb,0xf9,0xbf,0x7b,0x33,0xed,0x45,0x20,0xcc,0x31,0x73,0xbc,0xb9,0xdf,0x80,0x43,0x5a,0xab,0xf4,0x8b,0xf5,0x4d,0x2d,0x20,0x7e,0x9c,0xb1};
    static std::uint8_t sum72[32]    = {0x95,0x5c,0xad,0x35,0x94,0x29,0x55,0x5c,0x1e,0x1a,0xe8,0x4b,0x57,0x47,0xd3,0x83,0x0f,0x06,0x7e,0xb2,0xbb,0x05,0x65,0x1b,0x68,0x97,0x03,0xbe,0x16,0x2c,0x3b,0x15};
    sm9_fn_from_bytes(augend, augend72);
    sm9_fn_from_bytes(addend, addend72);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum72, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend73[32] = {0x95,0xa8,0x00,0x4d,0x25,0x10,0xaf,0x1e,0x8e,0xda,0x86,0x34,0x70,0x81,0x7e,0x38,0xab,0x76,0xca,0x34,0xa0,0x12,0x1c,0xc0,0x05,0x07,0xe8,0xe5,0xca,0x1a,0x46,0xba};
    static std::uint8_t addend73[32] = {0xb4,0x11,0x71,0xd0,0x88,0xc4,0x07,0x1b,0xdf,0x73,0x50,0x67,0x6f,0x0e,0xff,0x9d,0x69,0xe4,0xdd,0x28,0x3a,0x97,0xeb,0x0c,0x72,0x30,0x6d,0x5e,0xb8,0xbd,0xc6,0x74};
    static std::uint8_t sum73[32]    = {0x93,0x79,0x72,0x1d,0xab,0x31,0x0f,0x48,0x98,0x4a,0x2b,0x4b,0xea,0x01,0xb6,0x91,0xcb,0x69,0x14,0x11,0xc1,0xbf,0x7b,0xdd,0x91,0xc9,0x74,0xa7,0xac,0x39,0x3e,0x09};
    sm9_fn_from_bytes(augend, augend73);
    sm9_fn_from_bytes(addend, addend73);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum73, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend74[32] = {0x3e,0xfe,0x09,0x6d,0x13,0x1a,0x40,0x62,0x8b,0x22,0x43,0x93,0xfc,0x14,0x3c,0xdd,0xdc,0x9e,0x47,0x16,0x35,0x66,0x93,0x3e,0xb6,0xc3,0xd1,0x3b,0x91,0x03,0x32,0xe6};
    static std::uint8_t addend74[32] = {0x81,0x23,0xc7,0xc2,0x39,0x28,0xe5,0x47,0xf1,0x4d,0xed,0x98,0xf4,0x35,0x5b,0x2f,0x07,0x9d,0xac,0x18,0x64,0x4a,0xb0,0xfa,0xe7,0xcd,0xc0,0x4a,0xe2,0xb3,0x8c,0x88};
    static std::uint8_t sum74[32]    = {0x09,0xe1,0xd1,0x2f,0x49,0x9f,0x7e,0xb8,0xa6,0x6c,0x85,0xdc,0xfa,0xba,0xd0,0xc8,0x9a,0x49,0x5f,0xe3,0x80,0xc6,0xb8,0x4a,0xb9,0x22,0xaf,0xe9,0x9d,0x17,0xf0,0x49};
    sm9_fn_from_bytes(augend, augend74);
    sm9_fn_from_bytes(addend, addend74);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum74, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend75[32] = {0x6d,0x4a,0xc5,0x6a,0xce,0x66,0xed,0x3f,0x33,0x08,0x38,0x69,0xff,0xd0,0x2b,0xb8,0xb9,0x90,0x07,0x1e,0xed,0x91,0x4e,0x7c,0xb3,0xb5,0xda,0xf6,0x67,0x75,0x34,0x23};
    static std::uint8_t addend75[32] = {0x18,0x5a,0x0c,0x30,0x67,0x7a,0xcb,0xfa,0xb0,0x40,0xa8,0xf6,0x74,0xce,0x7a,0xb9,0x89,0xe4,0x83,0x45,0x22,0xe4,0x36,0x76,0x8d,0xf2,0x48,0x7f,0x8b,0x61,0xe2,0x59};
    static std::uint8_t sum75[32]    = {0x85,0xa4,0xd1,0x9b,0x35,0xe1,0xb9,0x39,0xe3,0x48,0xe1,0x60,0x74,0x9e,0xa6,0x72,0x43,0x74,0x8a,0x64,0x10,0x75,0x84,0xf3,0x41,0xa8,0x23,0x75,0xf2,0xd7,0x16,0x7c};
    sm9_fn_from_bytes(augend, augend75);
    sm9_fn_from_bytes(addend, addend75);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum75, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend76[32] = {0x36,0xed,0xd9,0x25,0xdd,0x22,0x50,0x0e,0x2e,0xc6,0x2d,0x4a,0xa3,0xa1,0x2a,0x83,0x3f,0x9b,0x57,0xef,0xbc,0x1d,0x61,0x6e,0x1f,0x54,0xef,0x8e,0x16,0x83,0x5c,0x87};
    static std::uint8_t addend76[32] = {0x42,0x46,0x67,0x9a,0xb7,0x82,0x7c,0x2a,0x27,0x4b,0x9c,0x82,0x68,0x9e,0x89,0x13,0xc4,0xd9,0xb5,0x22,0xf4,0x75,0xe7,0x95,0x32,0xea,0x54,0x71,0xf6,0xe6,0x03,0xe5};
    static std::uint8_t sum76[32]    = {0x79,0x34,0x40,0xc0,0x94,0xa4,0xcc,0x38,0x56,0x11,0xc9,0xcd,0x0c,0x3f,0xb3,0x97,0x04,0x75,0x0d,0x12,0xb0,0x93,0x49,0x03,0x52,0x3f,0x44,0x00,0x0d,0x69,0x60,0x6c};
    sm9_fn_from_bytes(augend, augend76);
    sm9_fn_from_bytes(addend, addend76);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum76, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend77[32] = {0x21,0x32,0x8f,0xdf,0x30,0x33,0x39,0x88,0xe6,0x39,0xc2,0xe7,0xf4,0x65,0x13,0xf3,0xe8,0x55,0x54,0xb6,0xc9,0xd2,0x3a,0xbd,0x66,0x64,0x77,0xe4,0xee,0xe8,0x12,0x81};
    static std::uint8_t addend77[32] = {0x44,0xc2,0xc8,0x1c,0x35,0x79,0x3b,0xfb,0xcb,0x48,0x61,0x42,0xd0,0x38,0x8e,0x75,0x2d,0x45,0x40,0x45,0xe2,0x26,0xb2,0x42,0x6a,0xd0,0x0b,0xa2,0xa9,0xa4,0x94,0x4f};
    static std::uint8_t sum77[32]    = {0x65,0xf5,0x57,0xfb,0x65,0xac,0x75,0x84,0xb1,0x82,0x24,0x2a,0xc4,0x9d,0xa2,0x69,0x15,0x9a,0x94,0xfc,0xab,0xf8,0xec,0xff,0xd1,0x34,0x83,0x87,0x98,0x8c,0xa6,0xd0};
    sm9_fn_from_bytes(augend, augend77);
    sm9_fn_from_bytes(addend, addend77);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum77, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend78[32] = {0x03,0xf5,0xfb,0x77,0xa4,0x94,0xa9,0xb6,0x68,0x28,0xe6,0x89,0x78,0x18,0x67,0x17,0xee,0xa3,0x26,0x13,0xc2,0x5a,0x94,0xcb,0xc1,0x4f,0xac,0x6e,0xf2,0x31,0x0c,0x6e};
    static std::uint8_t addend78[32] = {0x40,0xda,0xfc,0x71,0x3e,0x50,0x8e,0x55,0x90,0x18,0xe4,0x79,0x0b,0xf0,0xce,0x00,0xba,0xb2,0x49,0x2d,0xf5,0xec,0x36,0x70,0x6a,0x31,0x4b,0xf1,0x4c,0x8a,0x78,0xfc};
    static std::uint8_t sum78[32]    = {0x44,0xd0,0xf7,0xe8,0xe2,0xe5,0x38,0x0b,0xf8,0x41,0xcb,0x02,0x84,0x09,0x35,0x18,0xa9,0x55,0x6f,0x41,0xb8,0x46,0xcb,0x3c,0x2b,0x80,0xf8,0x60,0x3e,0xbb,0x85,0x6a};
    sm9_fn_from_bytes(augend, augend78);
    sm9_fn_from_bytes(addend, addend78);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum78, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend79[32] = {0x1e,0xdd,0x59,0x25,0xb5,0xd1,0xe2,0xb0,0x98,0xdd,0xb1,0xd4,0xc8,0x86,0x4a,0x48,0x2c,0xa5,0x03,0x6a,0xd0,0x1a,0xf3,0xcd,0xbf,0x4b,0xc2,0x55,0x06,0x70,0x1e,0x44};
    static std::uint8_t addend79[32] = {0x6c,0xcb,0xc6,0x5b,0x06,0x7e,0xe6,0x7c,0xf4,0x97,0x68,0xca,0x4d,0xfe,0xe3,0xfc,0x57,0xb8,0x9d,0xb7,0xd9,0xb2,0x24,0x7b,0x28,0xc5,0x99,0xd9,0xa9,0x12,0x60,0xbf};
    static std::uint8_t sum79[32]    = {0x8b,0xa9,0x1f,0x80,0xbc,0x50,0xc9,0x2d,0x8d,0x75,0x1a,0x9f,0x16,0x85,0x2e,0x44,0x84,0x5d,0xa1,0x22,0xa9,0xcd,0x18,0x48,0xe8,0x11,0x5c,0x2e,0xaf,0x82,0x7f,0x03};
    sm9_fn_from_bytes(augend, augend79);
    sm9_fn_from_bytes(addend, addend79);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum79, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend80[32] = {0x0b,0x7a,0xb6,0x0e,0x05,0xfe,0x6b,0x07,0x61,0x84,0xa7,0x90,0xf5,0x5d,0x25,0x5e,0xa3,0x4d,0xa4,0x3f,0xb2,0x42,0x69,0xb2,0x92,0xf7,0x39,0x39,0x78,0xbd,0xc9,0xb5};
    static std::uint8_t addend80[32] = {0x0d,0x0f,0x4e,0x3d,0xf5,0x52,0x95,0x8d,0x89,0x6d,0xed,0xcd,0x7a,0xc6,0x1c,0x77,0x2c,0xea,0x7f,0xc8,0x0c,0x66,0x93,0x2b,0x68,0xe3,0x32,0xc7,0x53,0x01,0x0f,0xc9};
    static std::uint8_t sum80[32]    = {0x18,0x8a,0x04,0x4b,0xfb,0x51,0x00,0x94,0xea,0xf2,0x95,0x5e,0x70,0x23,0x41,0xd5,0xd0,0x38,0x24,0x07,0xbe,0xa8,0xfc,0xdd,0xfb,0xda,0x6c,0x00,0xcb,0xbe,0xd9,0x7e};
    sm9_fn_from_bytes(augend, augend80);
    sm9_fn_from_bytes(addend, addend80);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum80, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend81[32] = {0x88,0xd4,0x0e,0x92,0xb9,0x7d,0x25,0xe9,0xae,0x10,0x1e,0xfb,0x0b,0x7e,0x12,0xeb,0x8d,0x8e,0x94,0x72,0xed,0x4f,0x8a,0x38,0xc5,0x4f,0xb9,0x60,0x12,0x28,0x1b,0xdb};
    static std::uint8_t addend81[32] = {0x9f,0xbb,0xaa,0x9e,0x38,0x01,0xdb,0x83,0x7f,0x5f,0x83,0xd4,0xa2,0xec,0x2f,0xa9,0x2b,0xdf,0x5f,0x16,0xe2,0x08,0x54,0x41,0xb4,0x60,0xc3,0xb4,0x25,0x1e,0x9f,0xc2};
    static std::uint8_t sum81[32]    = {0x72,0x4f,0xb9,0x30,0xee,0xdb,0x5a,0x7b,0x57,0x6b,0xf7,0x7f,0xb8,0xdb,0x7b,0x50,0x6f,0x7b,0x60,0x3e,0xb6,0x6d,0x52,0x8b,0x94,0x41,0x9b,0x77,0x60,0xa7,0xec,0x78};
    sm9_fn_from_bytes(augend, augend81);
    sm9_fn_from_bytes(addend, addend81);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum81, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend82[32] = {0xac,0xfb,0x8b,0xe9,0x3d,0x56,0x48,0x25,0x18,0xd8,0x18,0x01,0x17,0x3d,0x2c,0x35,0x1b,0xf4,0x20,0x3f,0x7a,0x5f,0x09,0x54,0x01,0x22,0x77,0xa3,0x01,0x1f,0xbe,0x78};
    static std::uint8_t addend82[32] = {0x66,0x1e,0xd2,0x73,0xb7,0x5b,0x18,0x63,0x0f,0xa7,0xf7,0x7d,0x92,0x8f,0x06,0xc1,0x23,0x33,0x58,0xeb,0xd2,0xf4,0xe6,0x9b,0xcf,0x7f,0x9d,0x1c,0xbc,0xb2,0x0a,0xe4};
    static std::uint8_t sum82[32]    = {0x5c,0xda,0x5e,0x5c,0xf2,0x0d,0xb9,0x96,0x52,0x7c,0x64,0x2e,0xb4,0x3d,0x6b,0xb1,0xf5,0x34,0xe5,0xe0,0x34,0x69,0x64,0x00,0xeb,0x33,0x33,0x22,0xe7,0x32,0xfa,0x37};
    sm9_fn_from_bytes(augend, augend82);
    sm9_fn_from_bytes(addend, addend82);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum82, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend83[32] = {0x26,0x4a,0xec,0x0b,0x0b,0x1d,0x57,0x12,0x1e,0xb4,0x16,0xd1,0x79,0xda,0x5b,0x48,0x20,0x67,0x5a,0x62,0x0e,0x73,0xc6,0xb0,0x86,0xb1,0x17,0x0d,0x7b,0x85,0x14,0x33};
    static std::uint8_t addend83[32] = {0x23,0x59,0x24,0x4d,0xd2,0xda,0x56,0x0d,0x2c,0x73,0xb7,0xce,0x0c,0x7c,0x19,0xca,0x59,0xc3,0x3d,0x31,0x13,0x63,0x2a,0xfe,0xc8,0x6a,0x49,0xa5,0x81,0x97,0xa6,0x7c};
    static std::uint8_t sum83[32]    = {0x49,0xa4,0x10,0x58,0xdd,0xf7,0xad,0x1f,0x4b,0x27,0xce,0x9f,0x86,0x56,0x75,0x12,0x7a,0x2a,0x97,0x93,0x21,0xd6,0xf1,0xaf,0x4f,0x1b,0x60,0xb2,0xfd,0x1c,0xba,0xaf};
    sm9_fn_from_bytes(augend, augend83);
    sm9_fn_from_bytes(addend, addend83);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum83, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend84[32] = {0x67,0xd5,0x80,0xdf,0xeb,0x73,0x67,0x10,0x1e,0xce,0x04,0xd0,0xa8,0x13,0xad,0x76,0xfd,0x27,0xfb,0x73,0x35,0x02,0x87,0x66,0xaf,0x65,0x2a,0x63,0x35,0xed,0x64,0xdf};
    static std::uint8_t addend84[32] = {0x52,0x54,0x35,0x5f,0x5e,0x19,0x85,0x2c,0xc0,0xf7,0x86,0x2c,0x69,0x4b,0xb2,0x12,0x54,0x2a,0xf4,0x45,0x6f,0xae,0xb7,0x57,0xc4,0x24,0x45,0x82,0x0c,0x80,0x55,0xbc};
    static std::uint8_t sum84[32]    = {0x03,0xe9,0xb6,0x3f,0x46,0xe9,0x45,0x4b,0x09,0xc1,0xdf,0xad,0x1b,0xd0,0x98,0x45,0x07,0x60,0x5c,0x6d,0x8b,0xc6,0xb2,0xcf,0x8e,0x1a,0x8e,0x48,0x6b,0xce,0xeb,0x76};
    sm9_fn_from_bytes(augend, augend84);
    sm9_fn_from_bytes(addend, addend84);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum84, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend85[32] = {0x10,0x1c,0xf0,0xfa,0x2f,0xba,0xe3,0xe9,0x14,0x39,0xd7,0x7e,0x61,0xbe,0xd4,0x8b,0x94,0x1d,0x4d,0x41,0x83,0xbd,0xe7,0x27,0x76,0x4b,0x32,0x27,0x81,0xd2,0x3f,0xb9};
    static std::uint8_t addend85[32] = {0xa0,0x5f,0xfe,0x54,0x6f,0x20,0x17,0x19,0xe3,0xf5,0x02,0x65,0x90,0xc1,0x34,0x2d,0x0d,0x24,0x8d,0x29,0x33,0x3f,0xed,0x7a,0x26,0xa6,0xd7,0x1b,0x07,0x7b,0xf8,0x79};
    static std::uint8_t sum85[32]    = {0xb0,0x7c,0xef,0x4e,0x9e,0xda,0xfb,0x02,0xf8,0x2e,0xd9,0xe3,0xf2,0x80,0x08,0xb8,0xa1,0x41,0xda,0x6a,0xb6,0xfd,0xd4,0xa1,0x9c,0xf2,0x09,0x42,0x89,0x4e,0x38,0x32};
    sm9_fn_from_bytes(augend, augend85);
    sm9_fn_from_bytes(addend, addend85);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum85, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend86[32] = {0x60,0x15,0xe4,0x08,0x7d,0xc1,0xd1,0xd2,0x67,0x4b,0x13,0x76,0x66,0x72,0xc0,0x06,0x54,0x41,0x2c,0x1d,0x4d,0xbb,0xcc,0xca,0xe1,0x37,0x49,0x70,0x33,0xb7,0xc3,0xa7};
    static std::uint8_t addend86[32] = {0x37,0xc9,0xb0,0x05,0x47,0x5c,0xad,0x74,0x52,0x78,0x94,0x92,0x46,0x33,0x17,0xf6,0x56,0x78,0x0d,0x05,0x96,0x26,0x95,0xda,0x08,0xab,0x3e,0xaa,0x92,0xc9,0x38,0xde};
    static std::uint8_t sum86[32]    = {0x97,0xdf,0x94,0x0d,0xc5,0x1e,0x7f,0x46,0xb9,0xc3,0xa8,0x08,0xac,0xa5,0xd7,0xfc,0xaa,0xb9,0x39,0x22,0xe3,0xe2,0x62,0xa4,0xe9,0xe2,0x88,0x1a,0xc6,0x80,0xfc,0x85};
    sm9_fn_from_bytes(augend, augend86);
    sm9_fn_from_bytes(addend, addend86);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum86, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend87[32] = {0x1f,0x3f,0x0c,0x83,0xaa,0x58,0xce,0x39,0xce,0x66,0xcb,0xa5,0x3c,0x7d,0xb3,0xac,0x31,0x05,0xb9,0xa9,0x07,0x4e,0x39,0xcc,0xf4,0x0f,0xce,0x09,0xd1,0xfb,0xf7,0x7c};
    static std::uint8_t addend87[32] = {0x22,0x86,0x33,0x63,0x46,0x0a,0x06,0x66,0x2b,0xb6,0x4d,0xc5,0x93,0xfa,0xdf,0x1c,0xda,0x9a,0xb0,0x62,0x78,0xbd,0x31,0x24,0x6d,0xc5,0xf8,0xda,0x80,0xe5,0x6f,0xfa};
    static std::uint8_t sum87[32]    = {0x41,0xc5,0x3f,0xe6,0xf0,0x62,0xd4,0x9f,0xfa,0x1d,0x19,0x6a,0xd0,0x78,0x92,0xc9,0x0b,0xa0,0x6a,0x0b,0x80,0x0b,0x6a,0xf1,0x61,0xd5,0xc6,0xe4,0x52,0xe1,0x67,0x76};
    sm9_fn_from_bytes(augend, augend87);
    sm9_fn_from_bytes(addend, addend87);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum87, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend88[32] = {0x84,0x96,0xdb,0xc7,0x06,0x78,0x5d,0x16,0x7f,0x68,0x15,0x25,0xa4,0xa7,0x1d,0x13,0x04,0x98,0xa5,0xb8,0x08,0x0b,0x6a,0x59,0xab,0xa8,0x81,0x47,0xd2,0x83,0xaa,0xd8};
    static std::uint8_t addend88[32] = {0x7c,0xe0,0x8d,0x20,0x53,0x6c,0x84,0x8a,0xb7,0xe1,0xbd,0x2a,0x21,0x47,0x76,0x5b,0x19,0x5e,0x2e,0x3f,0x1a,0x3a,0xa7,0x94,0xe0,0x69,0xc5,0xf4,0xb0,0xca,0x88,0x80};
    static std::uint8_t sum88[32]    = {0x4b,0x37,0x68,0xe7,0x57,0x41,0x3a,0xaf,0x61,0x46,0x26,0xff,0xd0,0x5f,0xcc,0x29,0xd4,0x04,0x40,0xac,0x09,0x5b,0x85,0xff,0xa6,0xa3,0x65,0x9f,0xac,0xaf,0x64,0x33};
    sm9_fn_from_bytes(augend, augend88);
    sm9_fn_from_bytes(addend, addend88);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum88, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend89[32] = {0xaf,0xf9,0x6e,0xd1,0x7e,0x2e,0x4d,0x14,0xef,0x94,0x04,0xc2,0xe2,0x56,0xc1,0x08,0x4b,0x36,0x12,0x29,0xc5,0xe2,0x1a,0x35,0xe3,0x8e,0xc1,0x72,0xd6,0x50,0xaa,0xbb};
    static std::uint8_t addend89[32] = {0xac,0x76,0x09,0x20,0x40,0xaf,0x8e,0x6b,0x5e,0x49,0x89,0xc8,0x1a,0x94,0xa6,0x3a,0x88,0x72,0xa4,0x5a,0x38,0x2c,0x69,0x0d,0xc2,0x31,0x79,0xda,0x9b,0x1f,0x51,0xd5};
    static std::uint8_t sum89[32]    = {0xa6,0x2f,0x77,0xf1,0xbc,0x3a,0x34,0x8e,0x77,0xd9,0xe3,0x3b,0x07,0x5c,0x9f,0xfe,0x89,0xb6,0x23,0x38,0xe5,0x23,0xf7,0x54,0xc0,0x51,0x59,0xb0,0x9a,0xd1,0x2d,0x6b};
    sm9_fn_from_bytes(augend, augend89);
    sm9_fn_from_bytes(addend, addend89);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum89, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend90[32] = {0x59,0xa6,0x5b,0x79,0xf6,0xeb,0x53,0x78,0x4c,0xb1,0x47,0x95,0xc8,0xbb,0xf5,0x19,0x46,0x3c,0xa9,0xed,0x2a,0x5c,0x4c,0x88,0xe5,0x88,0x51,0x8e,0x24,0x78,0x17,0xdf};
    static std::uint8_t addend90[32] = {0x44,0xfe,0x3a,0x12,0x41,0x97,0xa2,0x3c,0xf1,0xa6,0xfc,0xf0,0x13,0xcd,0x95,0x80,0x01,0x0a,0x66,0x31,0x48,0xc6,0x5f,0xfa,0x34,0x2e,0xbc,0x73,0x4d,0x11,0xff,0xc1};
    static std::uint8_t sum90[32]    = {0x9e,0xa4,0x95,0x8c,0x38,0x82,0xf5,0xb5,0x3e,0x58,0x44,0x85,0xdc,0x89,0x8a,0x99,0x47,0x47,0x10,0x1e,0x73,0x22,0xac,0x83,0x19,0xb7,0x0e,0x01,0x71,0x8a,0x17,0xa0};
    sm9_fn_from_bytes(augend, augend90);
    sm9_fn_from_bytes(addend, addend90);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum90, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend91[32] = {0x48,0x07,0x8f,0x5d,0xf1,0xb1,0xde,0x02,0x13,0xba,0x12,0x62,0x8f,0x97,0x18,0x20,0x88,0x2f,0xc2,0x1d,0x5f,0x9e,0xc8,0x64,0x06,0x15,0x81,0x2d,0xa4,0x14,0xd9,0xff};
    static std::uint8_t addend91[32] = {0x98,0x7f,0x41,0x4f,0x6c,0x71,0x1b,0x7e,0x7a,0x47,0x83,0x31,0x1e,0x6f,0x0b,0x72,0xcf,0xf0,0x12,0x4e,0x2b,0xd0,0x8a,0x38,0xb9,0x6a,0xe2,0x3a,0xfd,0xad,0x7a,0x9e};
    static std::uint8_t sum91[32]    = {0x2a,0x46,0xd0,0xad,0x5b,0x7f,0x52,0x8e,0xb7,0xfd,0xea,0x43,0xb8,0x77,0x5c,0x4f,0x0e,0x2d,0x41,0x20,0x72,0x84,0xc6,0xad,0xda,0x11,0x81,0xcb,0xcb,0x23,0x85,0x78};
    sm9_fn_from_bytes(augend, augend91);
    sm9_fn_from_bytes(addend, addend91);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum91, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend92[32] = {0x1b,0xcc,0xa6,0xc4,0x50,0x16,0x8c,0x87,0xda,0x6f,0x7d,0xe7,0x14,0x4e,0x64,0xa7,0x20,0xe4,0x52,0x3f,0x3a,0x17,0x7f,0x0f,0x4a,0x5e,0xd6,0x20,0x59,0xd7,0xec,0xc7};
    static std::uint8_t addend92[32] = {0x46,0xa2,0xe3,0xef,0x58,0x41,0xd2,0x84,0x1e,0x78,0xea,0xfe,0x9f,0x79,0xe2,0x0e,0x3a,0x65,0xa2,0x35,0x01,0xc3,0x4b,0x09,0x4b,0xf4,0x0b,0xa8,0x11,0x92,0x83,0x05};
    static std::uint8_t sum92[32]    = {0x62,0x6f,0x8a,0xb3,0xa8,0x58,0x5f,0x0b,0xf8,0xe8,0x68,0xe5,0xb3,0xc8,0x46,0xb5,0x5b,0x49,0xf4,0x74,0x3b,0xda,0xca,0x18,0x96,0x52,0xe1,0xc8,0x6b,0x6a,0x6f,0xcc};
    sm9_fn_from_bytes(augend, augend92);
    sm9_fn_from_bytes(addend, addend92);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum92, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend93[32] = {0xaf,0x3d,0xab,0x35,0x4a,0xbd,0xf7,0x87,0xb7,0x5e,0x0b,0xc5,0xc4,0x80,0x46,0x17,0x99,0x27,0x52,0x99,0x06,0x2c,0xd1,0x53,0x16,0x35,0x9a,0xc3,0x04,0xa7,0x10,0x16};
    static std::uint8_t addend93[32] = {0x16,0x34,0x43,0xf8,0xf1,0x92,0x8b,0xa3,0xf4,0x05,0xa3,0x10,0x2e,0x58,0x25,0xb4,0x8f,0xbf,0x86,0x8e,0x26,0x29,0xf4,0x37,0x1c,0x9d,0xec,0x56,0x16,0x8f,0x39,0x64};
    static std::uint8_t sum93[32]    = {0x0f,0x31,0xef,0x2e,0x39,0xac,0xdc,0x39,0xd5,0x60,0x03,0x85,0xfd,0x49,0xa4,0x87,0xde,0xf4,0x45,0xdc,0x13,0x6c,0x39,0x9b,0x4d,0x64,0xa5,0x7c,0x44,0x97,0x7a,0x55};
    sm9_fn_from_bytes(augend, augend93);
    sm9_fn_from_bytes(addend, addend93);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum93, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend94[32] = {0x4e,0x73,0x0f,0x72,0x20,0x92,0x74,0x46,0x4b,0xf1,0xe9,0x99,0x4d,0x77,0x19,0xa9,0x3e,0x9a,0xfe,0xce,0xc8,0x15,0x0b,0xfd,0x3c,0x9d,0x24,0x49,0x14,0xd8,0x11,0xf3};
    static std::uint8_t addend94[32] = {0x28,0x7b,0x4e,0x22,0x7a,0x1f,0x55,0x1d,0x0f,0x54,0xc6,0x93,0xd4,0xdb,0x00,0x47,0x59,0xb0,0xac,0x23,0x1f,0xc6,0x59,0x4f,0x91,0xdb,0xf8,0x5a,0x1d,0x4d,0x2e,0xe2};
    static std::uint8_t sum94[32]    = {0x76,0xee,0x5d,0x94,0x9a,0xb1,0xc9,0x63,0x5b,0x46,0xb0,0x2d,0x22,0x52,0x19,0xf0,0x98,0x4b,0xaa,0xf1,0xe7,0xdb,0x65,0x4c,0xce,0x79,0x1c,0xa3,0x32,0x25,0x40,0xd5};
    sm9_fn_from_bytes(augend, augend94);
    sm9_fn_from_bytes(addend, addend94);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum94, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend95[32] = {0x62,0x6f,0x52,0xf8,0xdb,0x6f,0xcd,0x03,0x8b,0xc6,0x0c,0x8f,0x0a,0x59,0xdf,0xa2,0x4e,0x28,0x3f,0xf2,0xa4,0xbf,0x8f,0x18,0x9f,0x7c,0x9e,0x51,0x83,0x3c,0x02,0x0b};
    static std::uint8_t addend95[32] = {0x08,0xf4,0xbe,0x8d,0xec,0x9f,0xf2,0xba,0x16,0xa3,0x5d,0x39,0x1f,0xad,0x9c,0xe0,0x9c,0x8d,0xe2,0xa6,0x51,0x3d,0x8e,0xb4,0xce,0x9c,0x94,0x6e,0x7d,0xbb,0xc0,0x61};
    static std::uint8_t sum95[32]    = {0x6b,0x64,0x11,0x86,0xc8,0x0f,0xbf,0xbd,0xa2,0x69,0x69,0xc8,0x2a,0x07,0x7c,0x82,0xea,0xb6,0x22,0x98,0xf5,0xfd,0x1d,0xcd,0x6e,0x19,0x32,0xc0,0x00,0xf7,0xc2,0x6c};
    sm9_fn_from_bytes(augend, augend95);
    sm9_fn_from_bytes(addend, addend95);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum95, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend96[32] = {0x30,0xea,0xe1,0x35,0x06,0x76,0x74,0x53,0x40,0x87,0xd9,0x0b,0x90,0xb9,0x47,0x5f,0x5d,0x3a,0xa9,0x77,0x44,0x31,0x27,0x31,0x3d,0x8a,0xa1,0xc1,0x82,0x44,0xff,0xe5};
    static std::uint8_t addend96[32] = {0x56,0x39,0x01,0x0c,0xbe,0x89,0x4b,0x74,0x54,0x31,0xd1,0x4f,0x5f,0xf7,0xff,0x62,0x42,0xe7,0x15,0xe9,0xb3,0x0e,0xab,0x58,0x65,0xda,0x4a,0x30,0x41,0x0b,0xb1,0xde};
    static std::uint8_t sum96[32]    = {0x87,0x23,0xe2,0x41,0xc4,0xff,0xbf,0xc7,0x94,0xb9,0xaa,0x5a,0xf0,0xb1,0x46,0xc1,0xa0,0x21,0xbf,0x60,0xf7,0x3f,0xd2,0x89,0xa3,0x64,0xeb,0xf1,0xc3,0x50,0xb1,0xc3};
    sm9_fn_from_bytes(augend, augend96);
    sm9_fn_from_bytes(addend, addend96);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum96, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend97[32] = {0x13,0xf1,0x33,0xa3,0x63,0x84,0x09,0x1e,0x32,0x8c,0xc3,0x87,0x54,0x0e,0x63,0x04,0xb8,0x86,0x0a,0x4a,0xb2,0xd1,0xee,0x1c,0xa1,0x8b,0xd4,0x4a,0xd2,0xec,0x39,0xec};
    static std::uint8_t addend97[32] = {0x0b,0xa5,0xfc,0x34,0x51,0xd3,0x4e,0xc9,0x7e,0x17,0x38,0x68,0xd4,0xc7,0xfb,0xd2,0x9e,0x23,0x54,0x39,0xab,0x7f,0xb3,0x63,0x61,0x9a,0xdb,0xf3,0xee,0x5f,0x82,0x0f};
    static std::uint8_t sum97[32]    = {0x1f,0x97,0x2f,0xd7,0xb5,0x57,0x57,0xe7,0xb0,0xa3,0xfb,0xf0,0x28,0xd6,0x5e,0xd7,0x56,0xa9,0x5e,0x84,0x5e,0x51,0xa1,0x80,0x03,0x26,0xb0,0x3e,0xc1,0x4b,0xbb,0xfb};
    sm9_fn_from_bytes(augend, augend97);
    sm9_fn_from_bytes(addend, addend97);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum97, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend98[32] = {0x3d,0x99,0x0a,0xd5,0xb2,0x27,0xe9,0xfd,0xcc,0x12,0xb8,0x69,0x46,0xa0,0xc6,0x57,0x77,0x14,0xe2,0xbb,0xe2,0x2b,0xcb,0x77,0x91,0xd4,0x0c,0x0e,0x33,0x19,0xff,0x5b};
    static std::uint8_t addend98[32] = {0x10,0x03,0xd8,0x5a,0x07,0x96,0x12,0x24,0x27,0x01,0xd4,0x5c,0xa7,0xd0,0x07,0xef,0xea,0xd1,0x83,0xab,0x7e,0x02,0x99,0xe8,0x59,0xc2,0xdd,0x6b,0x4c,0x28,0xcd,0xee};
    static std::uint8_t sum98[32]    = {0x4d,0x9c,0xe3,0x2f,0xb9,0xbd,0xfc,0x21,0xf3,0x14,0x8c,0xc5,0xee,0x70,0xce,0x47,0x61,0xe6,0x66,0x67,0x60,0x2e,0x65,0x5f,0xeb,0x96,0xe9,0x79,0x7f,0x42,0xcd,0x49};
    sm9_fn_from_bytes(augend, augend98);
    sm9_fn_from_bytes(addend, addend98);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum98, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
    static std::uint8_t augend99[32] = {0x71,0x9e,0xd5,0xc8,0xf5,0xdf,0xa1,0xec,0x40,0x20,0xde,0x86,0x33,0x29,0xe7,0xa5,0x38,0x81,0x47,0x20,0x59,0x4c,0xcc,0xab,0xcc,0xaf,0x0f,0x89,0x8f,0x6e,0x38,0x70};
    static std::uint8_t addend99[32] = {0x9f,0x58,0x8d,0x46,0xa1,0x07,0x45,0x09,0xe2,0xac,0xe4,0xb1,0x37,0x1e,0x11,0xa8,0x3e,0x87,0x50,0xbc,0x61,0xfd,0x9c,0xdd,0x31,0x47,0x18,0x20,0x7c,0x33,0xef,0x55};
    static std::uint8_t sum99[32]    = {0x5a,0xb7,0x63,0x0f,0x94,0x43,0x40,0x04,0x4c,0xca,0x17,0xe7,0x74,0xb9,0x32,0x09,0x2d,0x16,0x04,0x91,0xa2,0x5f,0xdd,0x9a,0x18,0x87,0x46,0x0d,0x35,0x03,0x58,0xa0};
    sm9_fn_from_bytes(augend, augend99);
    sm9_fn_from_bytes(addend, addend99);
    sm9_fn_add(sum, augend, addend);
    sm9_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum99, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_add");
    }
}